From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLwVt-0004dN-Gr for qemu-devel@nongnu.org; Fri, 07 Mar 2014 10:16:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLwVj-00052s-4f for qemu-devel@nongnu.org; Fri, 07 Mar 2014 10:16:41 -0500 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:36053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLwVi-00052D-I2 for qemu-devel@nongnu.org; Fri, 07 Mar 2014 10:16:31 -0500 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Mar 2014 20:46:27 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 8DB76E003F for ; Fri, 7 Mar 2014 20:50:07 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s27FGU3g63307922 for ; Fri, 7 Mar 2014 20:46:30 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s27FGP1d017179 for ; Fri, 7 Mar 2014 20:46:25 +0530 From: "Aneesh Kumar K.V" Date: Fri, 7 Mar 2014 20:46:17 +0530 Message-Id: <1394205380-31875-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1394205380-31875-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1394205380-31875-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/5] hw/9pfs/virtio-9p-local.c: move v9fs_string_free() to below "err_out:" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws, peter.maydell@linaro.org Cc: "Aneesh Kumar K.V" , qemu-devel@nongnu.org, Chen Gang From: Chen Gang When "goto err_out", 'v9fs_string' already was allocated, so still need free 'v9fs_string' before return. Signed-off-by: Chen Gang Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index df0dbffa7ac4..62e694370f34 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p-local.c @@ -1059,9 +1059,9 @@ static int local_unlinkat(FsContext *ctx, V9fsPath *dir, } /* Remove the name finally */ ret = remove(rpath(ctx, fullname.data, buffer)); - v9fs_string_free(&fullname); err_out: + v9fs_string_free(&fullname); return ret; } -- 1.8.3.2