projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f25391c
)
block/vvfat: Plug memory leak in check_directory_consistency()
author
Markus Armbruster
<armbru@redhat.com>
Wed, 28 May 2014 09:17:04 +0000
(11:17 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Fri, 30 May 2014 12:26:54 +0000
(14:26 +0200)
On error path. Introduced in commit
a046433a
. Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vvfat.c
patch
|
blob
|
history
diff --git
a/block/vvfat.c
b/block/vvfat.c
index 811b39c1ca0708f60d77f1d7aae46aeb0d24c3f4..56370c5c93476389e5956805d5ade5c421562f91 100644
(file)
--- 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;