From patchwork Mon May 15 14:21:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3213 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp6821711dyk; Mon, 15 May 2023 07:22:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73GXjkn6hYiUsBmT+jSFVmeRjodQX+HKbixEER2sDucrVHPDFI95UQDmKwXIN3DJ2vD9fd X-Received: by 2002:a6b:ee07:0:b0:763:5555:a6a2 with SMTP id i7-20020a6bee07000000b007635555a6a2mr21723567ioh.10.1684160550039; Mon, 15 May 2023 07:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684160550; cv=none; d=google.com; s=arc-20160816; b=k5MeA1AtA94hl33pVmVRuduXb+EK9xcDrrXprnHw3o2HpwprxUdpzKHAwU+KIy3g9Y 9GvNunqgbs30Vhqa7l3hxrnxCl/cWVlWp2GifB1W6T0RAJ/tPaXXo9qocW/slUuCt3H5 ghb7oylMjGQOaSQ5JeNJMASuPZiqMRJGkLLy0iPXuTI5RtOWt4k9teUFHTqV2W3DX49H cjZYYrVcBOMEB2FmmlWjpwoVVEA4jD1LvFZKkaeZQh6rPcZaqiP+vs5Tys0umvIkY6eo nvTX4E91uIdWTfLoJa+EXtuJe58u+llJKK8wv3BxOTqw73LlGv7HAmJtboPli+u2bAey tO/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature :dkim-signature; bh=hvMU68pXAQ1HSVzzJJHPwypjROzWX4r6p423/Ok3+is=; b=wizwfY0BKlqBF0Lel4XHp7UdzyETQ5Lacax+yiUBdl0TLoEwTvACQ3PeJyboM7ajdG QQqMi46JnGsZUJz0O/cgxmA1MhiHTGtipbkqo508I6ES4oNAkZ0JlaUwH76PsuChraVm sGZliABzIc/hIVVoHes13GkgBR5q6Rz0eLMZeKoEvrrGQ+R0DQVAXKTlYRvhTvv4Csqe xdiXpPgkz9zFsB47cdEmJE81CTJ48G60shFst6iMzwrSw3PRzom7I4Pvl97QKLkF+bku ZKkSP/rYkGD3WTKWzMIDf6zSNADaSegty61K1USxO8IHJq2B3NbKkm21SQI1s4VCmzqh pMyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Eg7iLH9O; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=AwqZ0U2f; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=Dv4ZSZj6; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id f4-20020a056638328400b00418673fac2fsi6068524jav.18.2023.05.15.07.22.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 May 2023 07:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Eg7iLH9O; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=AwqZ0U2f; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=Dv4ZSZj6; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pyZ4x-0008RI-Fc; Mon, 15 May 2023 14:21:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pyZ4v-0008RB-6t for openvpn-devel@lists.sourceforge.net; Mon, 15 May 2023 14:21:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VCp0OUpGZ9M2cAJ86a5eGfCbQjce/osOOAOOg7bsDm0=; b=Eg7iLH9OL+7oA4KlHaXpZ9lybp cuD8YHfaaTTEKlnjMZaNyTOHZqz2Dq/ir2ermgPrBFbAIZL7Rc1/KGXPzPsSOcfhJpKP8C8BhfzZj HR/GDg4YZvkmsUP8rXy73Nf5iU6VcJeaUlc57GXPqzzAWzQVYVXln495ABI4hKYE7pfA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=VCp0OUpGZ9M2cAJ86a5eGfCbQjce/osOOAOOg7bsDm0=; b=A wqZ0U2fFsYXjkHZIwuEIpggegODfEUpzOYhY32c9yNcSiFQVOveaab2MGbOwWeUhUKr3uK803t/2A ebsIsTwxiH+XQxOmRuaNsCTOhXBQ+6bMjHDL0zMf3VPD4xuFUa7eHfFTOHoo61ZDY990sphfdvepr dy14s+1UZXHQZcyw=; Received: from mout-p-101.mailbox.org ([80.241.56.151]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pyZ4q-008T2j-RC for openvpn-devel@lists.sourceforge.net; Mon, 15 May 2023 14:21:33 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4QKhPT2hNyz9sc8 for ; Mon, 15 May 2023 16:21:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1684160477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VCp0OUpGZ9M2cAJ86a5eGfCbQjce/osOOAOOg7bsDm0=; b=Dv4ZSZj6UKrZ/csQTu6+dEa8V9oRjrr4vNfZot1hKVoBGXtcvrczHwY3KnTwA53jjsFqf/ cCpEiRqMlbPiic1/IEkdWF3GR5RYr+gs0i7Tl71JprEF/XW3TnWwiP93PkLyDkcGXIf4fk m/S6HBIyKw4eUF2US/rLFYRgknnqG67xPfv4vCTNUYU86h2Sq+lcaJEa8qSwEjhL1SWKdi wUW/6zNtE9Oh2EGr79e8nuurBio/Ymx9xTgtuA9apanIkl7/zgV7z8/7wHhvHOAoSgSK4B tYUEdCdW49sAGGDoh9Ueiaoc8Wt1XecbiJUEc8FN+sq7rd/GJuxyGayzDLrzWw== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Mon, 15 May 2023 16:21:16 +0200 Message-Id: <20230515142116.33135-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Leaks a small amount of memory every 15s. Signed-off-by: Frank Lichtenheld --- src/openvpn/dco_linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 796e6f25..2bfdf980 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -925,7 +925,10 @@ dco_get_peer_stats_multi [...] Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1pyZ4q-008T2j-RC Subject: [Openvpn-devel] [PATCH] DCO: fix memory leak in dco_get_peer_stats_multi for Linux X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1765970332128145270?= X-GMAIL-MSGID: =?utf-8?q?1765970332128145270?= Leaks a small amount of memory every 15s. Signed-off-by: Frank Lichtenheld Acked-by: Antonio Quartulli --- src/openvpn/dco_linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 796e6f25..2bfdf980 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -925,7 +925,10 @@ dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m) nlmsg_hdr(nl_msg)->nlmsg_flags |= NLM_F_DUMP; - return ovpn_nl_msg_send(dco, nl_msg, dco_parse_peer_multi, m, __func__); + int ret = ovpn_nl_msg_send(dco, nl_msg, dco_parse_peer_multi, m, __func__); + + nlmsg_free(nl_msg); + return ret; } static int