From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Pa/v90u+; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id E02105A0272 for ; Thu, 09 Jul 2026 00:32:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783549936; 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=lVLm51CgK3KR+I4lW0TAckIjBj6i4RY3Nh5EzyHSgJ0=; b=Pa/v90u+BnseXzCITNwtv1aqCR5Ba+Ve62PZnxI4p+2pxeOkuLRkXJlVfCv7wIogqBF0kG bdipB79vhBiyItuhS6S4/0lLoJCwQ35jnAUTRhcbgbYiHASq3+rrAX6yJrb/12pKpzCoKx p5E/ylZ74butU9KLjvaCxsR4C/1Aoto= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-261-7opDJCttPbmJb-PAMxq8hQ-1; Wed, 08 Jul 2026 18:32:15 -0400 X-MC-Unique: 7opDJCttPbmJb-PAMxq8hQ-1 X-Mimecast-MFC-AGG-ID: 7opDJCttPbmJb-PAMxq8hQ_1783549934 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45A4F1955F11; Wed, 8 Jul 2026 22:32:14 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.88.44]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 70CC31955F75; Wed, 8 Jul 2026 22:32:13 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH 7/7] doc/platform-requirements: Close leaked sockets in test_close_dup() Date: Wed, 8 Jul 2026 18:32:03 -0400 Message-ID: <20260708223203.885345-8-jmaloy@redhat.com> In-Reply-To: <20260708223203.885345-1-jmaloy@redhat.com> References: <20260708223203.885345-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: jnpJJBtlxW_M3f41tMRaxWknTSlCKUQO0Efs558q5L4_1783549934 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: J2Z3JG7SKOHV3M3NFCFQPZQQT7CNSHXA X-Message-ID-Hash: J2Z3JG7SKOHV3M3NFCFQPZQQT7CNSHXA X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: s1 and send_s were not closed before returning, leaking file descriptors across the loop iterations in main(). Signed-off-by: Jon Maloy --- doc/platform-requirements/udp-close-dup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/platform-requirements/udp-close-dup.c b/doc/platform-requirements/udp-close-dup.c index 99060fcb..abb719a5 100644 --- a/doc/platform-requirements/udp-close-dup.c +++ b/doc/platform-requirements/udp-close-dup.c @@ -87,6 +87,9 @@ static void test_close_dup(enum dup_method method) token = random(); send_token(send_s, token); recv_token(s1, token); + + close(s1); + close(send_s); } int main(int argc, char *argv[]) -- 2.52.0