Skip to content

Commit

Permalink
block/vvfat: Plug memory leak in check_directory_consistency()
Browse files Browse the repository at this point in the history
On error path.  Introduced in commit a046433.  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>
(cherry picked from commit 6262bbd)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
Markus Armbruster authored and mdroth committed Jul 3, 2014
1 parent 7267e51 commit 501da93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/vvfat.c
Expand Up @@ -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;

Expand Down

0 comments on commit 501da93

Please sign in to comment.