glibc/glibc-upstream-2.39-284.patch
2026-05-19 15:08:01 -04:00

23 lines
735 B
Diff

commit f47dd22366d5f66a4ca635f7be700e65c2ab2a81
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Nov 6 14:33:22 2025 +0100
support: Fix FILE * leak in check_for_unshare_hints in test-container
The file opened via fopen is never closed.
(cherry picked from commit 20a2a756089eacd7e7f4c02e381e82b5d0e40a2c)
diff --git a/support/test-container.c b/support/test-container.c
index 2813b0ddf572fc48..a9c9926c21f3a21e 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -703,6 +703,7 @@ check_for_unshare_hints (int require_pidns)
val = -1; /* Sentinel. */
int cnt = fscanf (f, "%d", &val);
+ fclose (f);
if (cnt == 1 && val != files[i].bad_value)
continue;