From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433794; cv=none; d=zohomail.com; s=zohoarc; b=bBEjaCVWvH7mljNavr2i9fDWUb6DKv8lE+/VrJZ4Bk3IkkPrurx/emyv4r9lCHTGnTW5sfgSIKb2gPPTQV3/gtGX5uQqKfq+sr1OVWHzvbpBrgFNgP2J1dWIk8YOAsS81VwQwVpnZVmis/m6/ATP+jUoFBHqiNA0GMADLi5AuiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433794; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fboSYf7RRjInANhts7kuvR+LXEWdzIFcMZDo+YaxFvk=; b=igKWzT07XxXyv2oUwymHcf1gMbwKpTKMxbdB7opmICBBZX/myFNfk/+M+pcEpKHrB42X+pYEAfeK+VbdKvpeAgk8cQ2DKpw1xZ2aX+v8Fr4QZAZpELV5eLM0Wk6PSZCFql9nS0x8egDLZ8ySM76KG/5GInP+101WoeJ53oWyVnU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603433794560900.208097905843; Thu, 22 Oct 2020 23:16:34 -0700 (PDT) Received: from localhost ([::1]:48120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqNN-0004Pz-GZ for importer@patchew.org; Fri, 23 Oct 2020 02:16:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJp-0000C1-BO; Fri, 23 Oct 2020 02:12:53 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48244 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJn-0000u2-4A; Fri, 23 Oct 2020 02:12:53 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 93A9F95D6ADF27123BE4; Fri, 23 Oct 2020 14:12:35 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:29 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 1/7] tests/migration: fix memleak in wait_command/wait_command_fd Date: Fri, 23 Oct 2020 14:12:12 +0800 Message-ID: <20201023061218.2080844-2-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.35; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:37 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, Thomas Huth , zhang.zhanghailiang@huawei.com, pannengyuan@huawei.com, Maxim Levitsky , Paolo Bonzini , ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Properly free each command resp to avoid memory leak. ASAN shows memory leak stack: Indirect leak of 2352520 byte(s) in 571 object(s) allocated from: #0 0x7f6ca3308d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e) #1 0x7f6ca3127a50 in g_malloc0 (/lib64/libglib-2.0.so.0+0x55a50) #2 0x557bf3c71d2b in qdict_new ../qobject/qdict.c:29 #3 0x557bf3c9caba in parse_object ../qobject/json-parser.c:318 #4 0x557bf3c9ce75 in json_parser_parse ../qobject/json-parser.c:580 #5 0x557bf3c8c8cf in json_message_process_token ../qobject/json-streame= r.c:92 #6 0x557bf3c9ea59 in json_lexer_feed_char ../qobject/json-lexer.c:313 #7 0x557bf3c9eeb5 in json_lexer_feed ../qobject/json-lexer.c:350 #8 0x557bf3c4793a in qmp_fd_receive ../tests/qtest/libqtest.c:608 #9 0x557bf3c47b58 in qtest_qmp_receive ../tests/qtest/libqtest.c:618 #10 0x557bf3c44245 in wait_command ../tests/qtest/migration-helpers.c:59 #11 0x557bf3c445cb in migrate_query_status ../tests/qtest/migration-hel= pers.c:108 #12 0x557bf3c44642 in check_migration_status ../tests/qtest/migration-h= elpers.c:124 #13 0x557bf3c447e7 in wait_for_migration_status ../tests/qtest/migratio= n-helpers.c:148 #14 0x557bf3c43b8f in test_migrate_auto_converge ../tests/qtest/migrati= on-test.c:1243 ...... Fix: 5e34005571af5 Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Thomas Huth Cc: Laurent Vivier Cc: Maxim Levitsky Cc: Paolo Bonzini --- tests/qtest/migration-helpers.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helper= s.c index b799dbafb7..4ee26014b7 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -32,7 +32,7 @@ static void check_stop_event(QTestState *who) QDict *wait_command_fd(QTestState *who, int fd, const char *command, ...) { va_list ap; - QDict *resp; + QDict *resp, *ret; =20 va_start(ap, command); qtest_qmp_vsend_fds(who, &fd, 1, command, ap); @@ -44,7 +44,11 @@ QDict *wait_command_fd(QTestState *who, int fd, const ch= ar *command, ...) g_assert(!qdict_haskey(resp, "error")); g_assert(qdict_haskey(resp, "return")); =20 - return qdict_get_qdict(resp, "return"); + ret =3D qdict_get_qdict(resp, "return"); + qobject_ref(ret); + qobject_unref(resp); + + return ret; } =20 /* @@ -53,7 +57,7 @@ QDict *wait_command_fd(QTestState *who, int fd, const cha= r *command, ...) QDict *wait_command(QTestState *who, const char *command, ...) { va_list ap; - QDict *resp; + QDict *resp, *ret; =20 va_start(ap, command); resp =3D qtest_vqmp(who, command, ap); @@ -64,7 +68,11 @@ QDict *wait_command(QTestState *who, const char *command= , ...) g_assert(!qdict_haskey(resp, "error")); g_assert(qdict_haskey(resp, "return")); =20 - return qdict_get_qdict(resp, "return"); + ret =3D qdict_get_qdict(resp, "return"); + qobject_ref(ret); + qobject_unref(resp); + + return ret; } =20 /* --=20 2.23.0 From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433953; cv=none; d=zohomail.com; s=zohoarc; b=SlJnvgD9+P+R7bvX7FS52KkLgOJ42qC16tq6i3pRpE5Kwy97uoxII22a7YmC5yZmJjyItl/mbhVsG/SVRZtLOMwBMwB+KjuzGoUjqgdMg8NNAHH5xK4+JHrAY3G0dTzjFuFqPrzfRw1L5XgPRuB765iY3sQnrWcmf6wezdwCk5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433953; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vSoO6m7ljlT3to7960s7XcU+ybVQxptT1k49Df901m4=; b=SsYXF66JdXQjJ/YakKK1J6mYNgoMNwa18SLkmPcfqoG85C6A62/hv34OWpn1Z5RFvAipNyVoeKAO4gs1TnndpSw8yUh34KqMYgezIDop569REXw8+4l5AqVFTGk7cLtDZuBUBs2fSO40uCDZOBQhGCWs6ukpXpJizuoyKMtHjhI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603433953974494.6120451798854; Thu, 22 Oct 2020 23:19:13 -0700 (PDT) Received: from localhost ([::1]:55078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqPw-0007JE-VN for importer@patchew.org; Fri, 23 Oct 2020 02:19:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJq-0000Cz-Ji; Fri, 23 Oct 2020 02:12:54 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5717 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJn-0000uw-HR; Fri, 23 Oct 2020 02:12:54 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 823479D4F2A21FFD91BE; Fri, 23 Oct 2020 14:12:40 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:31 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 2/7] qga/channel-posix: Plug memory leak in ga_channel_write_all() Date: Fri, 23 Oct 2020 14:12:13 +0800 Message-ID: <20201023061218.2080844-3-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.191; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:40 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, zhang.zhanghailiang@huawei.com, pannengyuan@huawei.com, Li Qiang , Michael Roth , ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan Missing g_error_free on error path in ga_channel_write_all(). Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- Cc: Michael Roth --- qga/channel-posix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qga/channel-posix.c b/qga/channel-posix.c index 0373975360..8f3821af6d 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -249,7 +249,7 @@ GIOStatus ga_channel_write_all(GAChannel *c, const gcha= r *buf, gsize size) buf +=3D written; } else if (status !=3D G_IO_STATUS_AGAIN) { g_warning("error writing to channel: %s", err->message); - return status; + goto out; } } =20 @@ -261,6 +261,10 @@ GIOStatus ga_channel_write_all(GAChannel *c, const gch= ar *buf, gsize size) g_warning("error flushing channel: %s", err->message); } =20 +out: + if (err) { + g_error_free(err); + } return status; } =20 --=20 2.23.0 From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433660; cv=none; d=zohomail.com; s=zohoarc; b=NT5wnzk9YOwbTzQLyhcS+/3bCeMBgR2IFi2oJzn2IihQjH6QtOzppKtMIunvud583EnYSaieScZYjAJoUTDFgP87/+GSv8vHzCCl1RmobjbEDTmzp/Sml/Bf4K3woj/ofxT34fmOB7KkvcDhUDcILhjkxUcdOQ5l5rQfdE8PSdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433660; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rt7+cosYxEGfIRFXLgF2ISM7olKnCHILTid4ET4jd9E=; b=V/hgnebYcmXZ0dQ9CN0DZBGsCEubJGtvYxRhDY12VVRc3GEmqKvvV3w31BeFq4970uZ9ish+jWSOVR4E3QLIz3T/Z26DdXKSCCfImqgSchLkrn34E1E0jmJr6NgChz9QP8ZreZJR1cIJn99rDjn1IYdfjgx6zRKSzZ1BiK98Nfk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603433660819130.41423205270132; Thu, 22 Oct 2020 23:14:20 -0700 (PDT) Received: from localhost ([::1]:41764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqLD-0001jE-9Z for importer@patchew.org; Fri, 23 Oct 2020 02:14:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJp-0000Bu-4v; Fri, 23 Oct 2020 02:12:53 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5205 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJn-0000uy-3q; Fri, 23 Oct 2020 02:12:52 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7040B41E4B0349170A3E; Fri, 23 Oct 2020 14:12:40 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:32 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Date: Fri, 23 Oct 2020 14:12:14 +0800 Message-ID: <20201023061218.2080844-4-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.190; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:41 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, zhang.zhanghailiang@huawei.com, Viktor Prutyanov , Li Qiang , pannengyuan@huawei.com, ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan Missing g_error_free in QEMU_Elf_init() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang Signed-off-by: Chen Qun Reviewed-by: Thomas Huth --- contrib/elf2dmp/qemu_elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/qemu_elf.c b/contrib/elf2dmp/qemu_elf.c index 0db7816586..b601b6d7ba 100644 --- a/contrib/elf2dmp/qemu_elf.c +++ b/contrib/elf2dmp/qemu_elf.c @@ -126,6 +126,7 @@ int QEMU_Elf_init(QEMU_Elf *qe, const char *filename) qe->gmf =3D g_mapped_file_new(filename, TRUE, &gerr); if (gerr) { eprintf("Failed to map ELF dump file \'%s\'\n", filename); + g_error_free(gerr); return 1; } =20 --=20 2.23.0 From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433673; cv=none; d=zohomail.com; s=zohoarc; b=noC/7Dt11bskBbyBEfMQOHGZbTih/BEMf9CD47XXNAk6RdYtxkcVoyVu95nEJLoSx44CQWvRUFQIu9SllSx0vNModXIqcZ53BxkQpe2YF19mca7/UM/0WE/yvM7h0nnYzDI1/nLVS060RtIgW2iCutnWQEdIR/EcZHd9rS0xEm0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433673; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UPEqeW5pEn1EQk2SWM3GuzTzqe4NN/IlZ1cKCbvMIes=; b=ZmUblsGn0Ow6EagMIHIr+tqB7l3JRPycVFcT47Yysg3f/8Q/zNKQ4/qgCtbe6UAJ4ATnDbZDF4uYIJ+0UqWeJb1Xxw5uFcg4bXbNL305T6UXIXOEweSaHXEC9Fvwfoxd82ImWOrZymiwUJpSwcTmynDFIDwGDa2GW0Vvog3hCuo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603433673940917.9077773300024; Thu, 22 Oct 2020 23:14:33 -0700 (PDT) Received: from localhost ([::1]:42568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqLQ-000232-Kn for importer@patchew.org; Fri, 23 Oct 2020 02:14:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJp-0000Bs-4j; Fri, 23 Oct 2020 02:12:53 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5204 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJm-0000ux-Tf; Fri, 23 Oct 2020 02:12:52 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B23FBF6EE23FC696F94D; Fri, 23 Oct 2020 14:12:40 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:34 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 4/7] elf2dmp/pdb: Plug memleak in pdb_init_from_file Date: Fri, 23 Oct 2020 14:12:15 +0800 Message-ID: <20201023061218.2080844-5-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.190; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:41 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, zhang.zhanghailiang@huawei.com, Viktor Prutyanov , Li Qiang , pannengyuan@huawei.com, ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan Missing g_error_free in pdb_init_from_file() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang Signed-off-by: Chen Qun Reviewed-by: Thomas Huth --- contrib/elf2dmp/pdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c index a5bd40c99d..b3a6547068 100644 --- a/contrib/elf2dmp/pdb.c +++ b/contrib/elf2dmp/pdb.c @@ -285,6 +285,7 @@ int pdb_init_from_file(const char *name, struct pdb_rea= der *reader) reader->gmf =3D g_mapped_file_new(name, TRUE, &gerr); if (gerr) { eprintf("Failed to map PDB file \'%s\'\n", name); + g_error_free(gerr); return 1; } =20 --=20 2.23.0 From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433945; cv=none; d=zohomail.com; s=zohoarc; b=lMbe2d+T2R/sm9vC0dNm5a4vzZdtesI8To2grG5g9o0YJGoN3Lfr7XP798joH61nPloyy/eHpELvIfNEiFaCQa40Qd57xmqZOvRVRrSxw2xYzdfVM3ChkToATRCSqZGI8rsGH9Z+YZr06/vZdVyusL72ynfDMLtNDu3/PNdndq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433945; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rkoLs3kUXoXliUFqpDoKiXx11DviyhcY6JfL0U7VEsU=; b=D+nc8lA/zgWjOU921bBDhKObVLIcc9mEvAVs/P4/E+3m7Amj8rpx3PLlcw99EWSVYBZSU4GCkmT9nrhHlESyCY+fh8QTqjeKxgisnA4CngnlSkVZJOaWxb6zS2X5i1WUjb/iUcmEFTmM3Om8HGc94EDGvHWQakxu5YA3VTpmja8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603433945411437.6658905761152; Thu, 22 Oct 2020 23:19:05 -0700 (PDT) Received: from localhost ([::1]:54472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqPo-00074D-B9 for importer@patchew.org; Fri, 23 Oct 2020 02:19:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJq-0000Cu-FT; Fri, 23 Oct 2020 02:12:54 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47516 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJo-0000wk-EJ; Fri, 23 Oct 2020 02:12:54 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8E6D9956478C8FB263FF; Fri, 23 Oct 2020 14:12:45 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:36 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 5/7] migration/colo: Plug memleaks in colo_process_incoming_thread Date: Fri, 23 Oct 2020 14:12:16 +0800 Message-ID: <20201023061218.2080844-6-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:37 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, zhang.zhanghailiang@huawei.com, Juan Quintela , pannengyuan@huawei.com, Li Qiang , "Dr. David Alan Gilbert" , ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan 'local_err' forgot to free in colo_process_incoming_thread error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- Cc: Hailiang Zhang Cc: Juan Quintela Cc: "Dr. David Alan Gilbert" --- migration/colo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration/colo.c b/migration/colo.c index 3f1d3dfd95..7cc5a37192 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -886,7 +886,6 @@ void *colo_process_incoming_thread(void *opaque) while (mis->state =3D=3D MIGRATION_STATUS_COLO) { colo_wait_handle_message(mis, fb, bioc, &local_err); if (local_err) { - error_report_err(local_err); break; } =20 @@ -922,6 +921,10 @@ out: qemu_fclose(fb); } =20 + if (local_err) { + error_report_err(local_err); + } + /* Hope this not to be too long to loop here */ qemu_sem_wait(&mis->colo_incoming_sem); qemu_sem_destroy(&mis->colo_incoming_sem); --=20 2.23.0 From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433816; cv=none; d=zohomail.com; s=zohoarc; b=T/VMAI5ashlFKhTRHJf2uQQKkg1p7eu5ySNStUJ/mx5NsYRtMT8eHDmJvgnSbnIDYtwRdGtVsOzjE1OZ4cFFUzDMDMYqaWVyKmbBXu/P2ioGANuKwR7Bj+qBGeoIayvpyvdHmJlxHUBmvgn42YVvamoafngAZtCrZSOIhdUILMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433816; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oBBpPiohjphRYAIF6dQvPCxbU1J/rsl9yz6wgtLCgX4=; b=QcgMclVMV02Nd49U0Hh3uK2Mr9HB6u6UY3l2N7x669q4I4TRscSbzQJyWv7U1uRGX7lUZ7x2frxVSkMk2ZkDvEPxdKV518C8M0vYkJ5RZ+AOYX9kLcd5u/6xagw33FlJnAbV8OILhRrYj/l4iTOTc1xmdUeTKX2xYVqxM2xW49E= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603433816427872.2579856715353; Thu, 22 Oct 2020 23:16:56 -0700 (PDT) Received: from localhost ([::1]:48846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqNj-0004jO-88 for importer@patchew.org; Fri, 23 Oct 2020 02:16:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJq-0000CZ-6t; Fri, 23 Oct 2020 02:12:54 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47520 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJn-0000wl-RL; Fri, 23 Oct 2020 02:12:53 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 93D45756E6E4B91F8C0F; Fri, 23 Oct 2020 14:12:45 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:37 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 6/7] blockdev: Fix a memleak in drive_backup_prepare() Date: Fri, 23 Oct 2020 14:12:17 +0800 Message-ID: <20201023061218.2080844-7-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:37 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, Kevin Wolf , zhang.zhanghailiang@huawei.com, Li Qiang , pannengyuan@huawei.com, ganqixin@huawei.com, Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan 'local_err' seems forgot to propagate in error path, it'll cause a memleak. Fix it. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Kevin Wolf Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- blockdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/blockdev.c b/blockdev.c index fe6fb5dc1d..6fd68f74f3 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1827,6 +1827,7 @@ static void drive_backup_prepare(BlkActionState *comm= on, Error **errp) if (set_backing_hd) { bdrv_set_backing_hd(target_bs, source, &local_err); if (local_err) { + error_propagate(errp, local_err); goto unref; } } --=20 2.23.0 From nobody Sat May 18 18:57:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603433817; cv=none; d=zohomail.com; s=zohoarc; b=BGE+tDaECpJndPrd6vjqMKGWsSdsy6E6IQDrxAziXJWJxGGF0kD/4f2/4v8LUQjAtWTg8R+o9eplxLQHzSGuh0DZ4Xc4jMd2y4y3QjlhLm86Rtf6fl0COBscfDykPs5vzfHmEAB7qipGu8ZmPdivdVrKLUyDKRTEwyZ3Ty2+EXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603433817; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Av0XoQjSlREHrpYNLL2ohLjJJuSw7ZiAQiIUaRWpLgM=; b=GKV90hyWlIShTh4sm6gcOxvwvLSEmVVmF2Wa2VQ8BrMjfXY4vl2VQdgIglwZgypv+yPTnfHbK6qCUV2J4ePnwVbaDLlyXflIhbaZsSdiX8BDDYbdJCmzMXq15jSaJ2oWEzISTC6LAZuOpZ4Q3lJcQerB5DtepVSG9KDWlm6g/ws= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16034338171551005.8805842330951; Thu, 22 Oct 2020 23:16:57 -0700 (PDT) Received: from localhost ([::1]:48948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqNk-0004ls-0r for importer@patchew.org; Fri, 23 Oct 2020 02:16:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJq-0000CU-1H; Fri, 23 Oct 2020 02:12:54 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47496 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqJn-0000wi-JC; Fri, 23 Oct 2020 02:12:53 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 883A9695B20B134086C6; Fri, 23 Oct 2020 14:12:45 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 23 Oct 2020 14:12:39 +0800 From: Chen Qun To: , Subject: [PATCH RESEND v2 7/7] block/file-posix: fix a possible undefined behavior Date: Fri, 23 Oct 2020 14:12:18 +0800 Message-ID: <20201023061218.2080844-8-kuhn.chenqun@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> References: <20201023061218.2080844-1-kuhn.chenqun@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.32; envelope-from=kuhn.chenqun@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:12:37 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, Kevin Wolf , zhang.zhanghailiang@huawei.com, Li Qiang , pannengyuan@huawei.com, ganqixin@huawei.com, Euler Robot , Chen Qun , Stefano Garzarella Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan local_err is not initialized to NULL, it will cause a assert error as below: qemu/util/error.c:59: error_setv: Assertion `*errp =3D=3D NULL' failed. Fixes: c6447510690 Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Stefano Garzarella Reviewed-by: Kevin Wolf Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index c63926d592..b711124672 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2110,7 +2110,7 @@ static void raw_aio_attach_aio_context(BlockDriverSta= te *bs, #endif #ifdef CONFIG_LINUX_IO_URING if (s->use_linux_io_uring) { - Error *local_err; + Error *local_err =3D NULL; if (!aio_setup_linux_io_uring(new_context, &local_err)) { error_reportf_err(local_err, "Unable to use linux io_uring, " "falling back to thread pool: "); --=20 2.23.0