From nobody Mon Feb 9 18:00:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552401860805856.8951395379693; Tue, 12 Mar 2019 07:44:20 -0700 (PDT) Received: from localhost ([127.0.0.1]:53797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3idf-0007QI-Ry for importer@patchew.org; Tue, 12 Mar 2019 10:44:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3iWO-0002EU-GG for qemu-devel@nongnu.org; Tue, 12 Mar 2019 10:36:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3iWN-0002wf-Pj for qemu-devel@nongnu.org; Tue, 12 Mar 2019 10:36:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46000) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3iWN-0002vw-Jb for qemu-devel@nongnu.org; Tue, 12 Mar 2019 10:36:47 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD5D3307D786 for ; Tue, 12 Mar 2019 14:36:46 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-46.ams2.redhat.com [10.36.112.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3419527C41 for ; Tue, 12 Mar 2019 14:36:45 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 12 Mar 2019 15:36:40 +0100 Message-Id: <20190312143640.32096-5-pbonzini@redhat.com> In-Reply-To: <20190312143640.32096-1-pbonzini@redhat.com> References: <20190312143640.32096-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 12 Mar 2019 14:36:46 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PULL 4/4] test-migration: fix memory leak 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Reported by ASAN. Signed-off-by: Paolo Bonzini --- tests/migration-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index 48dc20a2ae..bd3f5c3125 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -382,9 +382,10 @@ static char *migrate_get_socket_address(QTestState *wh= o, const char *parameter) =20 iv =3D qobject_input_visitor_new(object); visit_type_SocketAddressList(iv, NULL, &addrs, &local_err); + visit_free(iv); =20 /* we are only using a single address */ - result =3D g_strdup_printf("%s", SocketAddress_to_str(addrs->value)); + result =3D SocketAddress_to_str(addrs->value); =20 qapi_free_SocketAddressList(addrs); qobject_unref(rsp); --=20 2.20.1