qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 057/108] block/vvfat: Plug memory leak in check_dire


From: Michael Roth
Subject: [Qemu-devel] [PATCH 057/108] block/vvfat: Plug memory leak in check_directory_consistency()
Date: Wed, 6 Aug 2014 15:39:07 -0500

From: Markus Armbruster <address@hidden>

On error path.  Introduced in commit a046433a.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit 6262bbd363b53a1f19c473345d7cc40254dd5c73)
Signed-off-by: Michael Roth <address@hidden>
---
 block/vvfat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/vvfat.c b/block/vvfat.c
index 439a603..91c63f7 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1866,7 +1866,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.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]