From patchwork Wed Aug 3 14:55:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 9261527 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 10F1B60754 for ; Wed, 3 Aug 2016 15:40:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02D37237A5 for ; Wed, 3 Aug 2016 15:40:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBCA52818A; Wed, 3 Aug 2016 15:40:52 +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,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 AB400237A5 for ; Wed, 3 Aug 2016 15:40:52 +0000 (UTC) Received: from localhost ([::1]:35262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUyHr-0001DU-Rv for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 Aug 2016 11:40:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUxbr-0000qH-0S for qemu-devel@nongnu.org; Wed, 03 Aug 2016 10:57:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUxbp-0001rD-3X for qemu-devel@nongnu.org; Wed, 03 Aug 2016 10:57:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUxbo-0001qg-UX for qemu-devel@nongnu.org; Wed, 03 Aug 2016 10:57:25 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77BDB4E320 for ; Wed, 3 Aug 2016 14:57:24 +0000 (UTC) Received: from localhost (ovpn-116-73.phx2.redhat.com [10.3.116.73]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u73EvLn2000788; Wed, 3 Aug 2016 10:57:23 -0400 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Wed, 3 Aug 2016 18:55:35 +0400 Message-Id: <20160803145541.15355-31-marcandre.lureau@redhat.com> In-Reply-To: <20160803145541.15355-1-marcandre.lureau@redhat.com> References: <20160803145541.15355-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 03 Aug 2016 14:57:24 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.7 v3 30/36] usb: free leaking path 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: pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Marc-André Lureau qdev_get_dev_path() returns an allocated string, free it when no longer needed. Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann --- hw/usb/desc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/desc.c b/hw/usb/desc.c index adb026e..5e0e1d1 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -574,6 +574,7 @@ void usb_desc_create_serial(USBDevice *dev) } dst += snprintf(serial+dst, sizeof(serial)-dst, "-%s", dev->port->path); usb_desc_set_string(dev, index, serial); + g_free(path); } const char *usb_desc_get_string(USBDevice *dev, uint8_t index)