From patchwork Fri Apr 7 21:43:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi-Hung Wei X-Patchwork-Id: 748479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3w0Cn666zfz9s7j for ; Sat, 8 Apr 2017 07:45:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="I6aUddI0"; dkim-atps=neutral Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id CA80CB62; Fri, 7 Apr 2017 21:44:09 +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 253CCB49 for ; Fri, 7 Apr 2017 21:44:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E43AD177 for ; Fri, 7 Apr 2017 21:44:07 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id g2so17922465pge.2 for ; Fri, 07 Apr 2017 14:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tm4wgu+toKDuy9wWmFjl6ped0q6SmoNkd3W0hXmqMEI=; b=I6aUddI0Ok5qP7Mn8KagOltvsc5gqRZKj2daR4/3jtIBNsJc4BbA9nntSfFBj742Hd mcIxW7BxZZdhgXAT3ktXoGyeSVtzLue6t5LLe2XtfnfneM6QOOJNCXgOZjshJ92vMErt GSxYyZ4/wI/zjoc/AwNgED0rhPGYfc2y7XnkvkPr3BLgLLbvUFOs5Wp0ZRl/k1H8x3+P cUdJxXc2wQ/4Zoe2X3QI7x7IOAGdjBgSTtEDbaPeKa94fDWPvWGDbwho3UhKNExIrQ8N KYKEwB7y1IjtmlzN36RwhvWZuKbS7SXqjxIRKyzmGkvggK6Gve9Ggu9ebUawwwjtoShX e1Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tm4wgu+toKDuy9wWmFjl6ped0q6SmoNkd3W0hXmqMEI=; b=FFxM2T4DkZjOkHXqzgiP2RVLRC8/bO/5hpOS66USt5Nd1xb+ATwzJZ//EO+rFM6BhV 7IVaCvICNO0Njlv53jFscORJ9c5Iko+ZWZKtFXZSZnTnaXzrM9UI1LCxPUkQay8Mw2mZ VutyOfzOf4X2zGTLK24e7oqXfuSMLGPDDqNUsSMiiladyoCzH7fPWJf9pglH/z9CutDk +okTqP9tdOJxGQxgsp/cPm9zzYZeYSDAym7x7Z2EdomK0d7EV+5tpSOjg4FL6ogVqkKY xkUdIitAeNrAj8glhh7rEXmjaokCrAlZcW8bdUVL2AsTPwj+WGmkjNZ68yh4HBO2/v1j Knew== X-Gm-Message-State: AFeK/H3M0YUJffNivL7HMxEtUfzP8hEWyV/pgH9sFXwdi4NoddGkAMQXBV8jPVzRADOuLA== X-Received: by 10.98.144.4 with SMTP id a4mr22085060pfe.243.1491601447569; Fri, 07 Apr 2017 14:44:07 -0700 (PDT) Received: from sc9-mailhost3.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id p68sm11305044pga.6.2017.04.07.14.44.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Apr 2017 14:44:07 -0700 (PDT) From: Yi-Hung Wei To: dev@openvswitch.org Date: Fri, 7 Apr 2017 14:43:42 -0700 Message-Id: <1491601426-77274-4-git-send-email-yihung.wei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491601426-77274-1-git-send-email-yihung.wei@gmail.com> References: <1491601426-77274-1-git-send-email-yihung.wei@gmail.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 4/8] ovsdb-idl: Fix memory leak X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org In testcase "simple idl, conditional, multiple clauses in condition - C", valgrind reports a memory leak with the following call stack. xmalloc (util.c:112) resize (hmap.c:100) ovsdb_idl_condition_clone (ovsdb-idl.c:1075) ovsdb_idl_set_condition (ovsdb-idl.c:1095) update_conditions (test-ovsdb.c:2299) do_idl (test-ovsdb.c:2388) ovs_cmdl_run_command__ (command-line.c:115) main (test-ovsdb.c:73) Signed-off-by: Yi-Hung Wei --- lib/ovsdb-idl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 48b3af0d8855..c79951f82281 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -327,6 +327,7 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl) for (i = 0; i < idl->class->n_tables; i++) { struct ovsdb_idl_table *table = &idl->tables[i]; + ovsdb_idl_condition_destroy(&table->condition); shash_destroy(&table->columns); hmap_destroy(&table->rows); free(table->modes);