Message ID | 20201120001724.2424494-8-i.maximets@ovn.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CccZz2Bd0z9sVH for <incoming@patchwork.ozlabs.org>; Fri, 20 Nov 2020 11:18:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D219686EC1; Fri, 20 Nov 2020 00:18:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2lLAgw8WQR87; Fri, 20 Nov 2020 00:18:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 29A998700D; Fri, 20 Nov 2020 00:18:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0EF5FC1D9F; Fri, 20 Nov 2020 00:18:09 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 44DD8C1825 for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:18:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 21FD38754A for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:18:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ehGELwc5MPKg for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:18:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id AB53987534 for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:18:04 +0000 (UTC) X-Originating-IP: 78.45.89.65 Received: from im-t490s.redhat.com (ip-78-45-89-65.net.upcbroadband.cz [78.45.89.65]) (Authenticated sender: i.maximets@ovn.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id D314D24000A; Fri, 20 Nov 2020 00:18:01 +0000 (UTC) From: Ilya Maximets <i.maximets@ovn.org> To: ovs-dev@openvswitch.org Date: Fri, 20 Nov 2020 01:17:17 +0100 Message-Id: <20201120001724.2424494-8-i.maximets@ovn.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201120001724.2424494-1-i.maximets@ovn.org> References: <20201120001724.2424494-1-i.maximets@ovn.org> MIME-Version: 1.0 Cc: xu rong <xu.rong@zte.com.cn>, Ilya Maximets <i.maximets@ovn.org> Subject: [ovs-dev] [PATCH ovn 07/14] ovn-controller: Fix leak of pending ct zones. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <ovs-dev.openvswitch.org> List-Unsubscribe: <https://mail.openvswitch.org/mailman/options/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://mail.openvswitch.org/pipermail/ovs-dev/> List-Post: <mailto:ovs-dev@openvswitch.org> List-Help: <mailto:ovs-dev-request@openvswitch.org?subject=help> List-Subscribe: <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" <ovs-dev-bounces@openvswitch.org> |
Series |
Pack of fixes for memory leaks.
|
expand
|
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 70a193bb2..7b915ed6a 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -1512,7 +1512,7 @@ en_ct_zones_cleanup(void *data) struct ed_type_ct_zones *ct_zones_data = data; simap_destroy(&ct_zones_data->current); - shash_destroy(&ct_zones_data->pending); + shash_destroy_free_data(&ct_zones_data->pending); } static void
shash contains pointers to the data that should be freed. Direct leak of 32 byte(s) in 2 object(s) allocated from: #0 0x52100f in malloc (/controller/ovn-controller+0x52100f) #1 0x752436 in xmalloc /lib/util.c:138:15 #2 0x5a2f0b in add_pending_ct_zone_entry /controller/ovn-controller.c:548:45 #3 0x5a2d1d in update_ct_zones /controller/ovn-controller.c:668:9 #4 0x59d8c6 in en_ct_zones_run /controller/ovn-controller.c:1495:5 #5 0x5dade4 in engine_run /lib/inc-proc-eng.c:377:9 #6 0x59adf4 in main /controller/ovn-controller.c #7 0x7f0799ef41a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) CC: xu rong <xu.rong@zte.com.cn> Fixes: 252e1642fb59 ("ovn-controller: pending_ct_zones should be destroyed") Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- controller/ovn-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)