Received: from eggs.gnu.org ([2001:4830:134:3::10]:38311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF83E-0000FK-Ri for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF82w-0005KU-8V for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:43:12 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:49500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF82w-0005KF-2e for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:42:54 -0400 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Aug 2014 14:42:53 -0600 From: Michael Roth Date: Wed, 6 Aug 2014 15:39:07 -0500 Message-Id: <1407357598-21541-58-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 057/108] block/vvfat: Plug memory leak in check_directory_consistency() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Markus Armbruster On error path. Introduced in commit a046433a. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf (cherry picked from commit 6262bbd363b53a1f19c473345d7cc40254dd5c73) Signed-off-by: Michael Roth --- 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