From patchwork Wed Sep 11 21:18:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yifeng Sun X-Patchwork-Id: 1161294 Return-Path: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IrU96SZE"; dkim-atps=neutral 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 46TFFZ45Dmz9s00 for ; Thu, 12 Sep 2019 07:21:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id ED78BDB9; Wed, 11 Sep 2019 21:18:48 +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 8DCEDD67 for ; Wed, 11 Sep 2019 21:18:46 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4E70582B for ; Wed, 11 Sep 2019 21:18:46 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id y22so14526709pfr.3 for ; Wed, 11 Sep 2019 14:18:46 -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=Vdxh/9GZ1N6HSceqO6oKJ8TlXpb4R3A18bLTaBD/D7c=; b=IrU96SZEbcGmAzpObXr55E8XFdAkZmH6NTWr3YiGiORr96ZJoyye8r47+4I5hvfXRg mJrszGJFpcDbvkjXQPrGdcXpPa0EGDIOLrUJv5+RwVhWt/SMM9mIzy5W0Tl6weZRQYRj gZ3QyUMMi4hfdG7pN/B1iDYWcPD6PFmwaqYhDnixTQkHpJQXWJqaKWK0gGdnYpTyJ0dR OHGRAOcHFd1IJxeYIRHWZ6He3XZVfS7kM7zT94RfJqCNpt5gLtOAP0usW5iKiDkRGVmH /ei1wkueW8dudgV8ILGE6UyBw8vfHcF9CcUJU4R5mbPWCwH6tmfYNsVn1i58VeI6XNMu ICsg== 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=Vdxh/9GZ1N6HSceqO6oKJ8TlXpb4R3A18bLTaBD/D7c=; b=LHXBlTXq3v9geMeRzDU6XQj/bXwoxGVwTL2FmHfuUjFQqlFiv24TvTIhDNZzo7ym14 r/O60NgyH22fwdPQhi8GCwjt18Xm7dll6pV5oJahTVnG4fgqycR2T4Lpcuf/X7qOfYa6 4IWkaT39LyAkWWshZOXTgYD7j9iTpVOe8I7/K3OEsy2eAv7DaJpzFuy9mL9OUjLf8Des OKqDwyRDgrMZsiBARB2LKKiq2HrFWSN9MD9TYu+RncdOOBf9X9pYmCUEVC9fPXVcZwWd KdHQmuRCvrZqm+V0wYSzFMRRHeQ4rMijgJ2J1Lf0jan3wkLNwF7hASB41MO1y6L5Gcjv O+Fw== X-Gm-Message-State: APjAAAV6stIasJrcJIJKav9JIAH3c2iHHKBW8Bp5ctTfDSq+RaekR9sO MthQZGkJRW07CU4TF1ea/1iHup8I X-Google-Smtp-Source: APXvYqwHdhJAC+JWMWQJQwnEJLHVMAoO3KCy/wcFfz3w0uxvBTYyvYTMdIWJhYqD6CEF+OEJzhrKDw== X-Received: by 2002:a62:754a:: with SMTP id q71mr45097121pfc.70.1568236725663; Wed, 11 Sep 2019 14:18:45 -0700 (PDT) Received: from kern417.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id k1sm24612487pfi.132.2019.09.11.14.18.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Sep 2019 14:18:45 -0700 (PDT) From: Yifeng Sun To: dev@openvswitch.org Date: Wed, 11 Sep 2019 14:18:32 -0700 Message-Id: <1568236716-18105-6-git-send-email-pkusunyifeng@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568236716-18105-1-git-send-email-pkusunyifeng@gmail.com> References: <1568236716-18105-1-git-send-email-pkusunyifeng@gmail.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 06/10] ovsdb-client: Free ovsdb_schema 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 Valgrind reported: 1925: schema conversion online - standalone ==10727== 689 (56 direct, 633 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 66 ==10727== at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==10727== by 0x449D42: xcalloc (util.c:121) ==10727== by 0x40F45C: ovsdb_schema_create (ovsdb.c:41) ==10727== by 0x40F7F8: ovsdb_schema_from_json (ovsdb.c:217) ==10727== by 0x40FB4E: ovsdb_schema_from_file (ovsdb.c:101) ==10727== by 0x40B156: do_convert (ovsdb-client.c:1639) ==10727== by 0x4061C6: main (ovsdb-client.c:282) This patch fixes it. Signed-off-by: Yifeng Sun Acked-by: William Tu --- ovsdb/ovsdb-client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index 9ae15e557661..bfc90e6f7f85 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -1654,6 +1654,7 @@ do_convert(struct jsonrpc *rpc, const char *database_ OVS_UNUSED, ovsdb_schema_to_json(new_schema)), NULL); check_txn(jsonrpc_transact_block(rpc, request, &reply), &reply); jsonrpc_msg_destroy(reply); + ovsdb_schema_destroy(new_schema); } static void