From patchwork Tue Nov 3 12:32:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5577 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:4121:b0:118:2077:975e with SMTP id d33csp557887laa; Tue, 3 Nov 2026 04:33:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AKwUvBxQOorrPwGsWqsqaaeShBTjgmpXw29GUhrjSBZiZgsLznZmCO3QNH705A2QoyN3XPvbSJUPI1BF6ng=@openvpn.net X-Received: by 2002:a05:7023:90c:b0:138:30b1:4c00 with SMTP id a92af1059eb24-1ac56d95448mr21838441c88.3.1793709197047; Tue, 03 Nov 2026 04:33:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793709197; cv=none; d=google.com; s=arc-20260327; b=Smj2Fplp1UnrXzh2EPAzwNpXzL0mxbJc+G/aQ+jplkJC4bOATrcA8BZ9tiy2G1wNpx qPn5O+/xb1W98t2HSsaIfx+RvpgfAbbpLO0C6kRaXejgEy9/Wx0sHMpvHM7qCa5ctOmr 5ZYCbsD5JX6MWR04j/f6y6cW12gjBzNzuyiWCXuEhjtJJr9nh80UkVIhSo0lF9U4pCEX fT5oW7afUSGnTjUR3dJx72VpmOq68He6vjjT635YDmShZuB02zaHMqyrLyftAHPmXUmT PvsnZNSooCmPOuyj1MuHE7EhTIXM9tS5YjMxFue0uXMcARcFqcHC940Iis/I1hZ/MeP4 egyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=bNHSAMcJyWWm33rkv8EPre8PTQcuadcy7N995ih8jtc=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=jbYieWznBCA4oOvHz9HXKNWobf5qaK1ec/Mc0+xwAyRWtXiB+k3KwjExX7bKv1PASY P6hPbj0Bhbpqo1IVlUIkWU8etRWl1FkCUymd/LO2T27j2o8GbWLIU+AGrutGb5b4T9Su ScoelbFDdSnYYPg35o/rZeFKKZ5umC84U9PUPQU4VSraxXWTNImwtsVYRevbFqPizmPI xWXBcLNwpEVZm9BhvX6d3rZ2gNapm8IMDiX3jIzQUYvdT6jo4fW+QTUGawzmiHMI/xJS LaRe59Foxa0oJ/GSYa20Rb6ykTjoBZL6CB5au6ao2sHol0geMHBMSedy+6eSV0h9sX3g tdNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=lBUWJkIl; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=mnva3t6k; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PtCHFKi2; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id a92af1059eb24-1ac19c6c232si48420619c88.54.2026.11.03.04.33.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2026 04:33:17 -0800 (PST) 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=pass header.i=@lists.sourceforge.net header.s=beta header.b=lBUWJkIl; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=mnva3t6k; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PtCHFKi2; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=bNHSAMcJyWWm33rkv8EPre8PTQcuadcy7N995ih8jtc=; b=lBUWJkIlUJjWDI wQY5LNfjHdR6asucltcmH13LiBYCPptZzPODi2eUJDn1TzWha6cNDLZmRJy8JxYPa/U7oAFSwKdAn WhUsojEwLzM54VrM6/MfAnh0OHwkW3bPzWjYt6Agz0MBD2RuApYfvm/nhmoZ7CX9v26zbS05sKmOv qOQ=; 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.100.1) (envelope-from ) id 1xODhT-000000000h9-0vTI; Tue, 03 Nov 2026 12:33:15 +0000 Received: from [172.30.29.66] (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.100.1) (envelope-from ) id 1xODhS-000000000h3-1nFf for openvpn-devel@lists.sourceforge.net; Tue, 03 Nov 2026 12:33:14 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=whFidAckB0Tsb+DfxlQGIubD8tfRKFVWDQXdp8PAGrE=; b=mnva3t6kamMUBq5rL/jUseNzcq L1il53VMpJnQyiN6I/Vyq+k7NXyFGCn9qc0XKB3p9uQwtXV5M8rRoBanISeUEO6PaudsCwjEw4ZfN o3BV5pF/B/SEtmxQS25XH6z/vN6AJmzZoYmKp7R6dnhLMN5Wi7YhR/QlwWA6dmF3zu/8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=whFidAckB0Tsb+DfxlQGIubD8tfRKFVWDQXdp8PAGrE=; b=PtCHFKi2iRJsr105p5T020tGOR 3hfGJLXndLahgjQBzFI6lHe+hRMJ0DEbI1I/z912ld6wDURDE+Xt+Rc2aZYjNi8FfY6pH4A2RMD3N YigA7cxwUbh0OMHzday+JUWhXxT4u9QVk8Fe4a3AOHD583h7nxPmNHsmeJzuoEAdKx8A=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xODhR-0000000027W-1dia for openvpn-devel@lists.sourceforge.net; Tue, 03 Nov 2026 12:33:14 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6A3CX6BY003892 for ; Tue, 3 Nov 2026 13:33:06 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6A3CX6YS003891 for openvpn-devel@lists.sourceforge.net; Tue, 3 Nov 2026 13:33:06 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 3 Nov 2026 13:32:58 +0100 Message-ID: <20261103123306.3866-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", 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: From: Razvan Cojocaru - tls_session_generate_dynamic_tls_crypt_key(): kds - socks_proxy_recv_char(): reads fd_set - verify_cert_call_command(): gc - man_dispatch_command(): gc, the unused nparms parameter and the done labe [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xODhR-0000000027W-1dia Subject: [Openvpn-devel] [PATCH v2] Remove unused local variables 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: 1880840414975531319 X-GMAIL-MSGID: 1880840414975531319 From: Razvan Cojocaru - tls_session_generate_dynamic_tls_crypt_key(): kds - socks_proxy_recv_char(): reads fd_set - verify_cert_call_command(): gc - man_dispatch_command(): gc, the unused nparms parameter and the done label, which only served gc_free() Change-Id: Ie6c1fa663978eedca2391f1250129bc46738faa0 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2098 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2098 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 16864c8..102f96e 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -1478,16 +1478,12 @@ } static void -man_dispatch_command(struct management *man, struct status_output *so, const char **p, - const int nparms) +man_dispatch_command(struct management *man, struct status_output *so, const char **p) { - struct gc_arena gc = gc_new(); - ASSERT(p[0]); if (streq(p[0], "exit") || streq(p[0], "quit")) { man->connection.halt = true; - goto done; } else if (streq(p[0], "help")) { @@ -1841,9 +1837,6 @@ { msg(M_CLIENT, "ERROR: unknown command [%s], enter 'help' for more options", p[0]); } - -done: - gc_free(&gc); } #ifdef _WIN32 @@ -2250,7 +2243,7 @@ if (nparms > 0) { - man_dispatch_command(man, so, (const char **)parms, nparms); + man_dispatch_command(man, so, (const char **)parms); } } diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c index cab9af6..a8c9fd3 100644 --- a/src/openvpn/socks.c +++ b/src/openvpn/socks.c @@ -86,10 +86,6 @@ const struct event_timeout *server_poll_timeout, volatile int *signal_received) { - fd_set reads; - FD_ZERO(&reads); - openvpn_fd_set(sd, &reads); - struct timeval tv; tv.tv_sec = get_server_poll_remaining_time(server_poll_timeout); tv.tv_usec = 0; diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index 73e3696..167e659 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -515,7 +515,6 @@ char *subject) { int ret; - struct gc_arena gc = gc_new(); struct argv argv = argv_new(); setenv_str(es, "script_type", "tls-verify"); @@ -526,7 +525,6 @@ argv_msg_prefix(D_TLS_DEBUG, &argv, "TLS: executing verify command"); ret = openvpn_run_script(&argv, es, 0, "--tls-verify script"); - gc_free(&gc); argv_free(&argv); if (ret) diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index 23c7975..447262c 100644 --- a/src/openvpn/tls_crypt.c +++ b/src/openvpn/tls_crypt.c @@ -121,9 +121,6 @@ const int key_direction = session->opt->server ? KEY_DIRECTION_NORMAL : KEY_DIRECTION_INVERSE; - struct key_direction_state kds; - key_direction_state_init(&kds, key_direction); - struct key_type kt = tls_crypt_kt(); init_key_ctx_bi(&session->tls_wrap_reneg.opt.key_ctx_bi, &rengokeys, key_direction, &kt,