From patchwork Wed Jul 27 03:12:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 653062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rzg632VbQz9s3v for ; Wed, 27 Jul 2016 13:12:41 +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=rlkVUlWE; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id BA2AE10E1B; Tue, 26 Jul 2016 20:12:40 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id BD98F10E16 for ; Tue, 26 Jul 2016 20:12:39 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 20F594200EB for ; Tue, 26 Jul 2016 21:12:39 -0600 (MDT) X-ASG-Debug-ID: 1469589158-09eadd7ae884a10001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id tQ3dzU7pYOw4mFv3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 26 Jul 2016 21:12:38 -0600 (MDT) X-Barracuda-Envelope-From: u9012063@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pf0-f194.google.com) (209.85.192.194) by mx1-pf1.cudamail.com with ESMTPS (AES128-SHA encrypted); 27 Jul 2016 03:12:37 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.192.194 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.192.194 X-Barracuda-RBL-IP: 209.85.192.194 Received: by mail-pf0-f194.google.com with SMTP id g202so976841pfb.1 for ; Tue, 26 Jul 2016 20:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=xysVO8Dzq/NHc9a8pZeM6RCn9k2Sqmlr3UJWJb2BbKg=; b=rlkVUlWEgDn2buwOZT9staUjUkKOy9MLX8yTgTnK/BSCfkc+whGafw67HHDw9OzOJp SwyNUBpZcAJYqU3uEky/Qma3pK5XnxUA/MAS3/mfjKgCCXtPZ8fBI2bWxYWTCbmdG3VH +i8f82DCvnLQADagYoDsB77d9aKRiTlK9nGbKd3LrM4Bq4hpth08gTb90d4vjgVXnLma ZdwKg0NT9+78W1m9B6/r0iK3v3PHPYvYGYdkvSzwlvtIkFsEz2RcB3izEYcnWv55sPWW lXuLqazy3oMlhlfL9QCNEcw3J80gp3NCiZLqPDPpJoyP1G0nn74wuKUXaOLdUHatlSGH 2xRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=xysVO8Dzq/NHc9a8pZeM6RCn9k2Sqmlr3UJWJb2BbKg=; b=Tj5JeeKcvrHa2Cp6nUNrTbfHKpe7CO4LMuqGwq0NM4Uy7Z6b7wmPVQ438aJxshFKet gP+gkW9/7fJ++sGXfAL2pu0Jm+sqyFYPz6ylounuhDWR/drPaWDrN3tftQCUDEPJQcqO RAuuBrdBxeMPDrTKAYbViTQkk3R/2en2ih2b1zem0ZKEZ7hmfN96gc9JVwr5c4oePqvb WGc7ZQ1kq7Wx1CYmgIYOBBWho+kB98z8pmpcgQFfWFGc7zJiwpRbBbOdnxcI3DTHHhtd W6+W6kwYvTN7l2jz2/3uOTl0nH3Uytd1jmlnvIr1TN6gLE4ifzKM3nv+HCM0srrsLoSn gJ0w== X-Gm-Message-State: AEkooutKbUwXMJmCIbR0lOjAR7AITFVWXXmbTSS5+UZnS/XnCyiUsQSGGvAX8wXbxT3Grw== X-Received: by 10.98.17.83 with SMTP id z80mr45840834pfi.38.1469589157197; Tue, 26 Jul 2016 20:12:37 -0700 (PDT) Received: from vm-dev.localdomain ([73.93.155.36]) by smtp.gmail.com with ESMTPSA id s23sm4568443pfd.23.2016.07.26.20.12.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 20:12:36 -0700 (PDT) X-CudaMail-Envelope-Sender: u9012063@gmail.com From: William Tu To: dev@openvswitch.org X-CudaMail-MID: CM-E1-725091118 X-CudaMail-DTE: 072616 X-CudaMail-Originating-IP: 209.85.192.194 Date: Tue, 26 Jul 2016 20:12:36 -0700 X-ASG-Orig-Subj: [##CM-E1-725091118##][PATCH] ovsdb: Fix memory leak reported by Valgrind. Message-Id: <1469589156-11452-1-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.5.0 X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1469589158 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, MAILTO_TO_SPAM_ADDR, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31546 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH] ovsdb: Fix memory leak reported by Valgrind. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Valgrind testcase 1967: simple idl, conditional, modify as delete due to condition - C reports the following leak: json_array_create_empty (json.c:185) json_parser_push_array (json.c:1234) json_parser_input (json.c:1328) json_lex_input (json.c:945) json_parser_feed (json.c:1103) json_from_string (json.c:1025) parse_json (test-ovsdb.c:227) update_conditions (test-ovsdb.c:2324) do_idl (test-ovsdb.c:2389) ovs_cmdl_run_command (command-line.c:121) main (test-ovsdb.c:73) Signed-off-by: William Tu --- tests/test-ovsdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index c21001e..4a68bca 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -2344,6 +2344,7 @@ update_conditions(struct ovsdb_idl *idl, char *commands) parse_link2_json_clause(idl, add_cmd, json->u.array.elems[i]); } } + json_destroy(json); } }