From: Kaifeng Zhu <kaifeng....@citrix.com>

Memory pointed by cluster leaks in error handling code.

Signed-off-by: Kaifeng Zhu <kaifeng....@citrix.com>
Coverity-ID: 1055917
Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>
---
 block-vvfat.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block-vvfat.c b/block-vvfat.c
index ec3363c..6cd57a2 100644
--- a/block-vvfat.c
+++ b/block-vvfat.c
@@ -1769,7 +1769,7 @@ static int check_directory_consistency(BDRVVVFATState *s,
 
        if (s->used_clusters[cluster_num] & USED_ANY) {
            fprintf(stderr, "cluster %d used more than once\n", 
(int)cluster_num);
-           return 0;
+           goto fail;
        }
        s->used_clusters[cluster_num] = USED_DIRECTORY;
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to