From patchwork Sat Mar 1 17:34:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 325470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C35752C00C3 for ; Sun, 2 Mar 2014 04:34:27 +1100 (EST) Received: from localhost ([::1]:60419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJnnt-00076U-Ed for incoming@patchwork.ozlabs.org; Sat, 01 Mar 2014 12:34:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJnnW-00075C-So for qemu-devel@nongnu.org; Sat, 01 Mar 2014 12:34:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJnnO-0000gJ-Fd for qemu-devel@nongnu.org; Sat, 01 Mar 2014 12:34:02 -0500 Received: from mail-pb0-x236.google.com ([2607:f8b0:400e:c01::236]:50725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJnnO-0000e1-7b for qemu-devel@nongnu.org; Sat, 01 Mar 2014 12:33:54 -0500 Received: by mail-pb0-f54.google.com with SMTP id ma3so1981265pbc.27 for ; Sat, 01 Mar 2014 09:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=p9S7UFZBMPx2JplT9dEKTQK0nRGgA3zlbdTYmieltdw=; b=F8JpQmjJjH6zw5qZRUMgpOH87T+G/6caAJ33kDwjSQJcCJYs5VDR/sG40DAy93NkO7 cnihXqfrfYAvw9vtIyeo4rQJkYHBXY2QgGnnT1CSxInSiP+MRzGOtpRRAbQJHpGzFVnB DvW4Fv2E+T3uwf/NPaU/susqb0t3BKmOrWmS6HehohIB9mzMQOxHUelGZTufALUMFV8e 4va4zM1jDkoZjS4ijt1Lyi+B0j+mY4IMIDg/tLS0hZFzf+y7AL01gtxYqJaQdVMH6mSY WpKz8/O/EuUZqc4MP0ZMT+FBu7Gi5c7YpSp4XT6accV5bmRh60qU9ktQwdeNIVXAIbuG IfNA== X-Received: by 10.68.180.37 with SMTP id dl5mr10216521pbc.111.1393695233041; Sat, 01 Mar 2014 09:33:53 -0800 (PST) Received: from [192.168.1.102] ([223.72.65.28]) by mx.google.com with ESMTPSA id z3sm42456820pas.15.2014.03.01.09.33.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 01 Mar 2014 09:33:52 -0800 (PST) Message-ID: <53121A12.5050105@gmail.com> Date: Sun, 02 Mar 2014 01:34:10 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Markus Armbruster , "Aneesh Kumar K.V" , aliguori@amazon.com, Eric Blake , "Daniel P. Berrange" 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> In-Reply-To: <531219CC.4050505@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::236 Cc: QEMU Developers Subject: [Qemu-devel] [PATCH 1/3] hw/9pfs/virtio-9p-local.c: move v9fs_string_free() to below "err_out:" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }