From nobody Tue Oct 28 02:10:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516114168551618.4184843330346; Tue, 16 Jan 2018 06:49:28 -0800 (PST) Received: from localhost ([::1]:39404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebSYJ-00038j-Rx for importer@patchew.org; Tue, 16 Jan 2018 09:49:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebS42-00030X-Cp for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebS3w-0004c2-HG for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:10 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:43646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebS3w-0004bN-Ag for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:04 -0500 Received: by mail-wr0-x241.google.com with SMTP id t16so1685439wrc.10 for ; Tue, 16 Jan 2018 06:18:04 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-229-84.clienti.tiscali.it. [78.12.229.84]) by smtp.gmail.com with ESMTPSA id u10sm1537758wrg.6.2018.01.16.06.18.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 06:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Rz4SJ9g5edYJJhxBRiJ+nXbAHi2H1DsaGTsAjHPPY5g=; b=oSdxaXFfh8QQs1FheuhQpU7Jyfuc5Q5HQDBymj0P1hwwHYCfSoCKvKWhzdVBu1SZ7M /SxtI8n7kU9G3pvgH0rs7SDM79/pOLv3EpBapq0+cMAVzRUpB19M597ycFv+7DiW5iuN ehX30QfhiR+7F5riTifp066WS+gnzKr8b4bXf3Dx2KIhB4t1nhhdxsWMAcV0Ixf/1LnE yTCTQvyAXpYllANWc3QgG5COP9/kqaLJFQboKGlOd01lhxkGmYb4ZeoF30Z8nBMICASM A6HRu9wYKY0PtEZ3ZhK8jwNT7Lo1dmGAgJu22GsJlt9RgNBf3gQJlRxdtRa8nXnS7mJh RAxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Rz4SJ9g5edYJJhxBRiJ+nXbAHi2H1DsaGTsAjHPPY5g=; b=hnl1riZIslorGbvVn1T1+zC9IGwdE87+FO+lVG/rTZx8mDp4VjBOV4NSgpUiYerW3K KwOu3iE4jsql12QmHjVikEpZthV3gUOYNKiBuJbOVueO2tNxInDJD4MW32ONNak56nbb sVj4S7X3aXWCM4MKDtKEEYCe6VDQK2OekOSNm3ie05wqOQtLLwnEGcXtOFPOWb2fOwIM fQQFtzJeKdevDjFir3R54sAv1U+VJHyAEKjTtVs0hIxKfBSsIHrQKJf7rmMxXp/YuKch JTW1pL9wf6DOJ98Em9UumRJ05IFokbL2DxHeQ1dv1Y8gjsl4nBnYKBlH0SS8Lbr6scEo 0kxw== X-Gm-Message-State: AKwxytci3yhymEtiRsohX0E0oXHWCegtMYIH70Ziy4BqZvT8B5y8gWz3 BrsHd9/V/4OviqzaXvhzzSpz8ILW X-Google-Smtp-Source: ACJfBov11pvpdz3fv6lQGcgjR6ggMdI/uIXaUJEj9Ilcq7VYu6WJX09jgEuSLTv0fyXRpGexB2Om4g== X-Received: by 10.223.160.55 with SMTP id k52mr19315853wrk.5.1516112283021; Tue, 16 Jan 2018 06:18:03 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 15:17:00 +0100 Message-Id: <1516112253-14480-19-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> References: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL 18/51] tests: fix migration-test 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: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau Direct leak of 12 byte(s) in 2 object(s) allocated from: #0 0x7f50d403c850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7f50d1ddf98f in vasprintf (/lib64/libc.so.6+0x8098f) Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20180104160523.22995-12-marcandre.lureau@redhat.com> 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 be598d3..799e24e 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -358,13 +358,14 @@ static void migrate_check_parameter(QTestState *who, = const char *parameter, const char *value) { QDict *rsp, *rsp_return; - const char *result; + char *result; =20 rsp =3D wait_command(who, "{ 'execute': 'query-migrate-parameters' }"); rsp_return =3D qdict_get_qdict(rsp, "return"); result =3D g_strdup_printf("%" PRId64, qdict_get_try_int(rsp_return, parameter, -1)= ); g_assert_cmpstr(result, =3D=3D, value); + g_free(result); QDECREF(rsp); } =20 --=20 1.8.3.1