From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKUod-0001a5-4R for qemu-devel@nongnu.org; Mon, 03 Mar 2014 10:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKUoU-0005tj-7o for qemu-devel@nongnu.org; Mon, 03 Mar 2014 10:30:03 -0500 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:37145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKUoT-0005t1-IX for qemu-devel@nongnu.org; Mon, 03 Mar 2014 10:29:54 -0500 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Mar 2014 20:59:49 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 7D467E0057 for ; Mon, 3 Mar 2014 21:03:25 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s23FTiiT4194714 for ; Mon, 3 Mar 2014 20:59:44 +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 s23FTkgC023410 for ; Mon, 3 Mar 2014 20:59:47 +0530 From: "Aneesh Kumar K.V" In-Reply-To: <53121A12.5050105@gmail.com> References: <52EF68CA.9060604@gmail.com> <20140203103429.GB10408@redhat.com> <52EF71DC.3000309@gmail.com> <52F0C8BA.7020709@gmail.com> <20140204110631.GD5632@redhat.com> <52F0CD67.5070601@gmail.com> <87siry3l7t.fsf@linux.vnet.ibm.com> <52F17B5E.1050602@gmail.com> <52FF3182.9090106@gmail.com> <53097D8E.1030803@gmail.com> <87sir850ho.fsf@blackfin.pond.sub.org> <87ha7o3c5x.fsf@blackfin.pond.sub.org> <530FCBAD.10305@gmail.com> <531219CC.4050505@gmail.com> <53121A12.5050105@gmail.com> Date: Mon, 03 Mar 2014 20:59:46 +0530 Message-ID: <87lhwrxpud.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/3] 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: Chen Gang , Markus Armbruster , aliguori@amazon.com, Eric Blake , "Daniel P. Berrange" Cc: QEMU Developers Chen Gang writes: > When "goto err_out", 'v9fs_string' already was allocated, so still need > free 'v9fs_string' before return. > > Signed-off-by: Chen Gang Reviewed-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 fc93e9e..77a04cd 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.7.11.7