From patchwork Thu Oct 3 18:19:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 98340 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 523F0384A81B for ; Thu, 3 Oct 2024 18:19:50 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id B3935385DDD1 for ; Thu, 3 Oct 2024 18:19:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3935385DDD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3935385DDD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727979567; cv=none; b=FQYFwWGa/Ro7pXlZaJa2BBYImYh7TW0jiKlgoeWpy3GO0TMuQXgM5LIMVDB2nWt+iAmJYpSEopG+qjBcno9x16BFi3fQJ+LT3IcoS87zH9noBerCR1A3nYjFyh5tLMzIlYl06PIx8M1scPXj8TFdhQbPGqdJ36Xre3v585scF1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727979567; c=relaxed/simple; bh=G77/4WcLjpXrb/oGn6Alt+RdwT9p1vLVgT9sIi7KZPI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=tGRY2wipDzkS+Qb352kaf5GpSzjWcD19YlKUg3mi+bu09IT6YS8m/g13OJphhJxRwcD8+xqiZAsX+TJ/rXc1PpddFysP6ZAqOEmgiBCV/UZwgFVnhz7NgxskI6jrj8gIS876cQOr8d+Quo32v5Tgm+zNL0td23SVp+9UirxKQCU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 62791A02CC; Thu, 3 Oct 2024 20:19:24 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7Doo_8UrIQND; Thu, 3 Oct 2024 20:19:24 +0200 (CEST) Received: from begin.home (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 39EBFA02C1; Thu, 3 Oct 2024 20:19:24 +0200 (CEST) Received: from samy by begin.home with local (Exim 4.98) (envelope-from ) id 1swQQ7-00000004gqc-35Bn; Thu, 03 Oct 2024 20:19:23 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Bruno Haible , commit-hurd@gnu.org Subject: [hurd, commited] hurd: Add missing va_end call in fcntl implementation. [BZ #32234] Date: Thu, 3 Oct 2024 20:19:23 +0200 Message-ID: <20241003181923.1118011-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: Bruno Haible * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Add va_end call in two code paths. --- sysdeps/mach/hurd/fcntl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c index 9451ed5649..2583f54ef2 100644 --- a/sysdeps/mach/hurd/fcntl.c +++ b/sysdeps/mach/hurd/fcntl.c @@ -148,6 +148,7 @@ __libc_fcntl (int fd, int cmd, ...) cmd = F_SETLKW64; break; default: + va_end (ap); return __hurd_fail (EINVAL); } @@ -204,7 +205,10 @@ __libc_fcntl (int fd, int cmd, ...) && fl->l_start != fl64.l_start) || (sizeof fl->l_len != sizeof fl64.l_len && fl->l_len != fl64.l_len)) - return __hurd_fail (EOVERFLOW); + { + va_end (ap); + return __hurd_fail (EOVERFLOW); + } } result = err ? __hurd_dfail (fd, err) : 0;