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=chobZhHW; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 040815A061E for ; Thu, 09 Jul 2026 23:57:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783634230; 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=I0wQWRj4db5xn+79rX/3m8i8nxX2bVWqPtkTpav4gQo=; b=chobZhHWxRFjUntF0fDo6XWvoURV+oVGrh0rF0dlDBsXqV7gh/5Dy+8WIVfZ1gSKgM3N8l /h8GqOqfzk9R9m+ye0UmlqidOGTKP99CWzV0ymRDDlaFk0Y0IGgpNX8u1DFY/K0PnqexiA lM+k8fbW3t65OHvYdnfySfc5p9hQAx4= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-30-E923rmHSMuuWzvx1Mn3t7g-1; Thu, 09 Jul 2026 17:57:09 -0400 X-MC-Unique: E923rmHSMuuWzvx1Mn3t7g-1 X-Mimecast-MFC-AGG-ID: E923rmHSMuuWzvx1Mn3t7g_1783634228 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9C54A1801373; Thu, 9 Jul 2026 21:57:08 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.88.44]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D7087195608A; Thu, 9 Jul 2026 21:57:07 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH v2 6/6] doc/platform-requirements: Close leaked sockets in test_close_dup() Date: Thu, 9 Jul 2026 17:56:56 -0400 Message-ID: <20260709215656.1351549-7-jmaloy@redhat.com> In-Reply-To: <20260709215656.1351549-1-jmaloy@redhat.com> References: <20260709215656.1351549-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Tul7N3RpIHarcVkoXGtoSmgbcJH10S47MC59I24Id5g_1783634228 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: W2OHWVOUNLL5WBL3ZE6CUVKV33QAQU4U X-Message-ID-Hash: W2OHWVOUNLL5WBL3ZE6CUVKV33QAQU4U 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 Reviewed-by: David Gibson --- v2: No changes. --- 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