From patchwork Fri Aug 5 08:24:15 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: 656105 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 3s5Lcf2cytz9ssP for ; Fri, 5 Aug 2016 19:10:26 +1000 (AEST) Received: from localhost ([::1]:43592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVb96-0003xy-9S for incoming@patchwork.ozlabs.org; Fri, 05 Aug 2016 05:10:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVaT7-0003Sw-D4 for qemu-devel@nongnu.org; Fri, 05 Aug 2016 04:27:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVaT6-0002eX-DR for qemu-devel@nongnu.org; Fri, 05 Aug 2016 04:27:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVaT6-0002eT-7i for qemu-devel@nongnu.org; Fri, 05 Aug 2016 04:27:00 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 DA75261E40 for ; Fri, 5 Aug 2016 08:26:59 +0000 (UTC) Received: from localhost (ovpn-116-55.phx2.redhat.com [10.3.116.55]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u758QvKY015184; Fri, 5 Aug 2016 04:26:58 -0400 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Fri, 5 Aug 2016 12:24:15 +0400 Message-Id: <20160805082421.21994-31-marcandre.lureau@redhat.com> In-Reply-To: <20160805082421.21994-1-marcandre.lureau@redhat.com> References: <20160805082421.21994-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 05 Aug 2016 08:26:59 +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 v4 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, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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)