From patchwork Fri May 12 15:50:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3212 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp5101906dyk; Fri, 12 May 2023 08:51:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73U9ncSYk+CnGuwulpuHy6VxvAeeYzfYppCM6GMQme+AtgSRU+mTIfg5tzw50gZIRLDpso X-Received: by 2002:a5d:9f51:0:b0:760:ea3c:7ba4 with SMTP id u17-20020a5d9f51000000b00760ea3c7ba4mr16377293iot.9.1683906670288; Fri, 12 May 2023 08:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683906670; cv=none; d=google.com; s=arc-20160816; b=HcrQYDCj1CvrNlYxeTXXs6Ay40U/MRaxwxN4O2hcXpIixznb3h6vnX9BLGb5sSmlCA KASziAC2yMZVR7FFZ/K83bPheKCOW2nVk3I8EKbHzlLhYOY31XhwMsR3ngQZBvPY2jQ2 9s830gQXh11ZyQGxapt5KsLrQy1XWJQHjBp/en3spfpdxJzKS9SoQR5fo6Zq+gQQuwv2 VGhE9feXaHXP4ZAR1+3Nlw+KpwNSp3NH6VS4a3J41Ny1Y6Pa8LHLaayqmsMfg0wxHmgU fuTLyAtFWwm/kYMCvvdb5n5ASNT2LbgDQtd+s7WZ7nh4UloNGy318Ej1/LldHPxnrWIo NGtA== 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=74JHownPvFIE6OKcX+wctZROrgaJVsCVll4nvmhLyDE=; b=ZvCIsQW2SoPpQ7FrERFiTASBW6EUnRUMykJzqXGEnlf3nSaHGMwSgKaqwAfJn8oxQX q3hVFdt97maFPtTqFy/WyGs8eYWZE1M2Po74YdagJsUuUnBpTagNcYdhCT4CJRwKHUHr P8kQR69V2dJfPpVPM80Rxc2S+R/BRGXSaEi9xdTF6wn5BOic9IZ6essXzWsgMydPe5VU nee2Kd3O0UhbfKPzT5yC5IRKvqmOduetlZqSSaJV17U4tfXSGmP6oG4szr9ULDXlHqpR VLmKCA/bjAo3/xUFY4+cAzj/e1WxuWarXKCA1hXIxVfNLBg6qz6u0if80Vs2gciVrPl7 pgcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Yjgr2oio; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="KA/YU/CZ"; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=ge7C2ns7; 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 v10-20020a5ed70a000000b0076391cdfc91si8657796iom.21.2023.05.12.08.51.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2023 08:51:10 -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=Yjgr2oio; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="KA/YU/CZ"; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=ge7C2ns7; 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-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pxV2a-0003Vt-1H; Fri, 12 May 2023 15:50:44 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pxV2Z-0003Vi-Ff for openvpn-devel@lists.sourceforge.net; Fri, 12 May 2023 15:50:44 +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=qNLiC7MxPQqE7TplbqK833+2KN2EsyhVhSk2FLwJSmY=; b=Yjgr2oioqGx6+GX6uLfmuFdYn/ /yse6FR7yOvr0lQlPMtg/ceKQsnYwA3fX2JiAhflvLDpCIKMImYsp23eW8bTJJp7gqnPFhFIzq7fJ QeYcqdMgOroSABVhItTJKFYAP+ttzq5hQLH41mpLr/9Ygax+P/03JqbqLS6fsVCMPuXc=; 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=qNLiC7MxPQqE7TplbqK833+2KN2EsyhVhSk2FLwJSmY=; b=K A/YU/CZkjiEmht+gvMeu/Sl/OnXMdBEMFtYT55bf+zu2KdUaCWPkiwwWe7eelKjbPP0aRtcmu7k8S +PNKnDCySqAHiDr6jIof7Ywbul7ITZVNUfmwww2BOpC3OvUJ3xtD6xpfztpca4MPJqC8gA02eiJTO ZOjnVE8ZScuI29IM=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pxV2X-004fwp-FK for openvpn-devel@lists.sourceforge.net; Fri, 12 May 2023 15:50:44 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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-201.mailbox.org (Postfix) with ESMTPS id 4QHtWg6s66z9sQm for ; Fri, 12 May 2023 17:50:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1683906623; 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=qNLiC7MxPQqE7TplbqK833+2KN2EsyhVhSk2FLwJSmY=; b=ge7C2ns7v8kuF6k98a50az77jbWKfCqRiBXTQV8+nPNO85r/88z3vfMMfOK0MmF51zRMvb oOIPB0U7QzNcsXhAAxure0aur3eIbInaSBRbqI99DXdFBsFLDhDiqQ08d397JYJ2W/bxWD HUnzHWqrq2h8MS4nN4rDAEsletgBLcS1TtfLwm8UoXRyYsaxF8H74mYfNPnb1bY5JzTpQM zwurstYadlV3ODdtF9wXsBqNRRmqjl8GAIA1ezPa+iJGJPbOmi2kbFGCr1KRl5FfGFoozs /Yb99RmRBsascLs4vGIrDqZMmo57zSntV6HmzCZdW/oMV4e8XweVFPueO723ZQ== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 12 May 2023 17:50:23 +0200 Message-Id: <20230512155023.444406-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: Since we only call this once, it is not a bad leak, but still. Change-Id: Id85766738c3ece4f2d1860f7d101e4446a894aed Signed-off-by: Frank Lichtenheld --- src/openvpn/dco_linux.c | 2 ++ 1 file changed, 2 insertions(+) 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.171 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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1pxV2X-004fwp-FK Subject: [Openvpn-devel] [PATCH] dco_linux: properly close dco version file 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?1765704120644624029?= X-GMAIL-MSGID: =?utf-8?q?1765704120644624029?= Since we only call this once, it is not a bad leak, but still. Change-Id: Id85766738c3ece4f2d1860f7d101e4446a894aed Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- src/openvpn/dco_linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 41540c0f..796e6f25 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -1020,6 +1020,7 @@ dco_version_string(struct gc_arena *gc) if (!fgets(BSTR(&out), BCAP(&out), fp)) { + fclose(fp); return "ERR"; } @@ -1031,6 +1032,7 @@ dco_version_string(struct gc_arena *gc) *nl = '\0'; } + fclose(fp); return BSTR(&out); }