From patchwork Tue Oct 27 22:30:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1388992 Return-Path: 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.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CDSMyyOB; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLRH23kbWz9sVD for ; Wed, 28 Oct 2020 09:30:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D9C39862B4; Tue, 27 Oct 2020 22:30:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oUuaQm59W4H2; Tue, 27 Oct 2020 22:30:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 565FE8626B; Tue, 27 Oct 2020 22:30:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3EA4CC0859; Tue, 27 Oct 2020 22:30:20 +0000 (UTC) X-Original-To: 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 44364C0051 for ; Tue, 27 Oct 2020 22:30:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1FE81870C9 for ; Tue, 27 Oct 2020 22:30:19 +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 fm-G+KC2aOqw for ; Tue, 27 Oct 2020 22:30:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by hemlock.osuosl.org (Postfix) with ESMTPS id 533DA8731B for ; Tue, 27 Oct 2020 22:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603837817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QZwNbmC0j3P7WtQq+Q9hWXTBnbyueE5n80QrkxbbJtc=; b=CDSMyyOBfQL2sHRVJOK46Uw0lOJulYjFM6EtRVYlfgkZMMJSoQCKXKmhbeNllKScGG9LI3 n8c42ac7Iz3NN1xJYMzd2AG3Sj6/IR27FBR8j+9wPttZ3GrBKY9RlJ7SMMALFCLF0dZ6CE 79CfKVW3ZoAcEsDBMq+p84FacxHcO/c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-rDzssFyjPZKIwyhUf4a2hA-1; Tue, 27 Oct 2020 18:30:15 -0400 X-MC-Unique: rDzssFyjPZKIwyhUf4a2hA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85498100746C for ; Tue, 27 Oct 2020 22:30:14 +0000 (UTC) Received: from dceara.remote.csb (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 978581992F for ; Tue, 27 Oct 2020 22:30:13 +0000 (UTC) From: Dumitru Ceara To: dev@openvswitch.org Date: Tue, 27 Oct 2020 23:30:10 +0100 Message-Id: <20201027223006.19043.24481.stgit@dceara.remote.csb> In-Reply-To: <20201027222941.19043.84337.stgit@dceara.remote.csb> References: <20201027222941.19043.84337.stgit@dceara.remote.csb> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dceara@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] pinctrl: Fix memory leak in controller_event_run(). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Valgrind report: ==4689== 639 (96 direct, 543 indirect) bytes in 3 blocks are definitely lost in loss record 141 of 146 ==4689== at 0x4C29E63: malloc (vg_replace_malloc.c:309) ==4689== by 0x51EEB3: xmalloc (util.c:138) ==4689== by 0x485034: resize (hmap.c:100) ==4689== by 0x4852BF: hmap_expand_at (hmap.c:175) ==4689== by 0x511A8E: hmap_insert_at (hmap.h:283) ==4689== by 0x512824: smap_add__ (smap.c:408) ==4689== by 0x511D20: smap_add (smap.c:55) ==4689== by 0x41B51E: controller_event_run (pinctrl.c:459) ==4689== by 0x422CCD: pinctrl_run (pinctrl.c:3155) ==4689== by 0x433511: main (ovn-controller.c:2588) Fixes: be1eeb09d373 ("OVN: introduce Controller_Event table") Signed-off-by: Dumitru Ceara --- controller/pinctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/pinctrl.c b/controller/pinctrl.c index f15afc5..bc482c0 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -465,6 +465,7 @@ controller_event_run(struct ovsdb_idl_txn *ovnsb_idl_txn, sbrec_controller_event_set_seq_num(event, ++event_seq_num); sbrec_controller_event_set_event_info(event, &event_info); sbrec_controller_event_set_chassis(event, chassis); + smap_destroy(&event_info); } }