From patchwork Fri Jun 3 07:38:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 9152015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7930D60221 for ; Fri, 3 Jun 2016 07:39:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AFBC200E7 for ; Fri, 3 Jun 2016 07:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FC9A26907; Fri, 3 Jun 2016 07:39:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2108200E7 for ; Fri, 3 Jun 2016 07:39:25 +0000 (UTC) Received: from localhost ([::1]:52944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8jhV-0002Xu-2Q for patchwork-qemu-devel@patchwork.kernel.org; Fri, 03 Jun 2016 03:39:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8jh4-0002Ux-LJ for qemu-devel@nongnu.org; Fri, 03 Jun 2016 03:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8jgz-0000YV-Mr for qemu-devel@nongnu.org; Fri, 03 Jun 2016 03:38:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53955 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8jgz-0000YQ-Hk for qemu-devel@nongnu.org; Fri, 03 Jun 2016 03:38:53 -0400 Received: from pps.filterd (m0075420.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u537aLCW047851 for ; Fri, 3 Jun 2016 03:38:53 -0400 Message-Id: <201606030738.u537aLCW047851@mx0a-001b2d01.pphosted.com> Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 23b3u44m9w-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 03 Jun 2016 03:38:52 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Jun 2016 08:38:51 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 3 Jun 2016 08:38:45 +0100 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: gkurz@linux.vnet.ibm.com X-IBM-RcptTo: qemu-devel@nongnu.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id D81F417D8042 for ; Fri, 3 Jun 2016 08:39:52 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u537ciwn57606322 for ; Fri, 3 Jun 2016 07:38:44 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u537cifO028109 for ; Fri, 3 Jun 2016 01:38:44 -0600 Received: from smtp.lab.toulouse-stg.fr.ibm.com (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u537ciLJ028104; Fri, 3 Jun 2016 01:38:44 -0600 Received: from bahia.huguette.org (icon-9-167-244-222.megacenter.de.ibm.com [9.167.244.222]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id F17D0220518; Fri, 3 Jun 2016 09:38:43 +0200 (CEST) From: Greg Kurz To: Greg Kurz Date: Fri, 03 Jun 2016 09:38:43 +0200 In-Reply-To: <146493859974.10856.12706484667247984078.stgit@bahia.huguette.org> References: <146493859974.10856.12706484667247984078.stgit@bahia.huguette.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16060307-0008-0000-0000-000002845D72 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16060307-0009-0000-0000-00001892BACE X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-06-03_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=62 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606030086 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 1/4] 9p: drop useless out: label X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Aneesh Kumar K.V" , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Eric Blake Signed-off-by: Greg Kurz --- v2: added Eric's r-b --- hw/9pfs/9p.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 587e901f81cc..12bd688f37d3 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1646,15 +1646,15 @@ static int v9fs_do_readdir_with_stat(V9fsPDU *pdu, } err = v9fs_co_name_to_path(pdu, &fidp->path, dent->d_name, &path); if (err < 0) { - goto out; + break; } err = v9fs_co_lstat(pdu, &path, &stbuf); if (err < 0) { - goto out; + break; } err = stat_to_v9stat(pdu, &path, &stbuf, &v9stat); if (err < 0) { - goto out; + break; } /* 11 = 7 + 4 (7 = start offset, 4 = space for storing count) */ len = pdu_marshal(pdu, 11 + count, "S", &v9stat); @@ -1671,7 +1671,7 @@ static int v9fs_do_readdir_with_stat(V9fsPDU *pdu, v9fs_path_free(&path); saved_dir_pos = dent->d_off; } -out: + g_free(dent); v9fs_path_free(&path); if (err < 0) {