Message ID | 20180702105019.10345-17-jkbs@redhat.com |
---|---|
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 (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41K43w65xTz9s29 for <incoming@patchwork.ozlabs.org>; Mon, 2 Jul 2018 20:58:20 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 74D50D10; Mon, 2 Jul 2018 10:51:02 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AC17CCF8 for <dev@openvswitch.org>; Mon, 2 Jul 2018 10:51:00 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 43116334 for <dev@openvswitch.org>; Mon, 2 Jul 2018 10:51:00 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id a12-v6so15060868wro.1 for <dev@openvswitch.org>; Mon, 02 Jul 2018 03:51:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=irbaDXyS9pyLGXK+JG+o07Q22qNTwbF2p2S7nEWwLN8=; b=t8/WhFbcACc1Z/Kadp9qLG4QfO8JUOjWgm5moX9L/DbjrI2PQQvjgdCDzrlsitqbBZ tAZYpjBiSOLJ1pvCIfY5BBOuJJn2on+gAg3OXS4J45HA9pbuc9FjGmIcPLhGXXfDHcnj RRLWy8q2K1hGH78fK/phJ4vvgd8bauKWRfdsNaIZMxGh+xR178a3j7a65ulbd+C/1KGN qy0EorbDuJfVHvGS239RwtB3QUZTdzFD2cnKgJXq82je8wIk5tKTS0M8w0lKacmd+fYY snDxOjLbCmZbMlxOQXphu3iaLLirnBEzxqRPeFGdrX7FF604SDHe2XDhtZ7uoJG3eAEe /FZw== X-Gm-Message-State: APt69E0Ba4K/KEhTnHnjJAzOBYljdvegxyl1tLaMAD/L8EXJ1t0LQCyn K7oPVerpVJmorW3RTp4+4KGTwy0+Rgc= X-Google-Smtp-Source: AAOMgpf1nyW0lsZ0qFsZMBfM3Hm0SyPP17U/EHIKNWq6EYFaD7tvyZuD7gBWyLlcIcGqsg0YLihxfQ== X-Received: by 2002:adf:a285:: with SMTP id s5-v6mr18593756wra.114.1530528658722; Mon, 02 Jul 2018 03:50:58 -0700 (PDT) Received: from redhat.com (218.red-2-136-166.dynamicip.rima-tde.net. [2.136.166.218]) by smtp.gmail.com with ESMTPSA id u13-v6sm7428438wri.72.2018.07.02.03.50.57 for <dev@openvswitch.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jul 2018 03:50:58 -0700 (PDT) From: Jakub Sitnicki <jkbs@redhat.com> To: dev@openvswitch.org Date: Mon, 2 Jul 2018 12:50:12 +0200 Message-Id: <20180702105019.10345-17-jkbs@redhat.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180702105019.10345-1-jkbs@redhat.com> References: <20180702105019.10345-1-jkbs@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 16/23] db-ctl-base: Fix resource deallocation on error path in cmd_get(). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org |
Series |
Don't use ctl_fatal() in command handlers from db-ctl-base
|
expand
|
diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index 2fff7127b..8d4799433 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -977,6 +977,7 @@ cmd_get(struct ctl_context *ctx) ctx->error = ovsdb_atom_from_string(&key, NULL, &column->type.key, key_string, ctx->symtab); if (ctx->error) { + free(key_string); return; }
Release resources now that we are returning to the caller on error. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> --- lib/db-ctl-base.c | 1 + 1 file changed, 1 insertion(+)