Message ID | 20201120001724.2424494-5-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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CccZg6cJ5z9sTL for <incoming@patchwork.ozlabs.org>; Fri, 20 Nov 2020 11:18:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 66BD687537; Fri, 20 Nov 2020 00:18:00 +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 Z4QkygJzxF1t; Fri, 20 Nov 2020 00:17:59 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id B8F5787539; Fri, 20 Nov 2020 00:17:59 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7D5FEC1825; Fri, 20 Nov 2020 00:17:59 +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 AD532C1DA8 for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:17:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 973D5874FD for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:17:57 +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 yrUgH8XQyeBR for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:17:56 +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 95CC487535 for <ovs-dev@openvswitch.org>; Fri, 20 Nov 2020 00:17:56 +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 003FB240006; Fri, 20 Nov 2020 00:17:53 +0000 (UTC) From: Ilya Maximets <i.maximets@ovn.org> To: ovs-dev@openvswitch.org Date: Fri, 20 Nov 2020 01:17:14 +0100 Message-Id: <20201120001724.2424494-5-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: Han Zhou <hzhou@ovn.org>, Ilya Maximets <i.maximets@ovn.org> Subject: [ovs-dev] [PATCH ovn 04/14] actions: Fix leak of select group members. 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/lib/actions.c b/lib/actions.c index d98af0f91..ea949e1bd 100644 --- a/lib/actions.c +++ b/lib/actions.c @@ -1188,6 +1188,7 @@ parse_select_action(struct action_context *ctx, struct expr_field *res_field) } if (n_dsts <= 1) { lexer_syntax_error(ctx->lexer, "expecting at least 2 group members"); + free(dsts); return; }
'dsts' should be freed in case of any error. Direct leak of 4 byte(s) in 1 object(s) allocated from: #0 0x502378 in realloc (/tests/ovstest+0x502378) #1 0x622826 in xrealloc /lib/util.c:149:9 #2 0x8194f4 in parse_select_action /lib/actions.c:1185:20 #3 0x814f49 in parse_set_action /lib/actions.c:3499:13 #4 0x814341 in parse_action /lib/actions.c:3554:9 #5 0x8139ef in parse_actions /lib/actions.c:3643:14 #6 0x8136a3 in ovnacts_parse /lib/actions.c:3678:9 #7 0x813c80 in ovnacts_parse_string /lib/actions.c:3705:5 #8 0x53a4e8 in test_parse_actions /tests/test-ovn.c:1321:17 #9 0x54e7a8 in ovs_cmdl_run_command__ /lib/command-line.c:247:17 #10 0x537c75 in test_ovn_main /tests/test-ovn.c:1630:5 #11 0x54e7a8 in ovs_cmdl_run_command__ /lib/command-line.c:247:17 #12 0x537359 in main /tests/ovstest.c:133:9 #13 0x7f9ce05ba1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) CC: Han Zhou <hzhou@ovn.org> Fixes: 85b3544aabb2 ("ovn-controller: A new action "select".") Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- lib/actions.c | 1 + 1 file changed, 1 insertion(+)