[PATCH] support: Fix FILE * leak in check_for_unshare_hints in test-container
Florian Weimer
fweimer@redhat.com
Thu Nov 6 13:49:33 GMT 2025
The file opened via fopen is never closed.
---
support/test-container.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/support/test-container.c b/support/test-container.c
index ae643d307e..f48cdaea68 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -705,6 +705,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;
base-commit: 3d3adec75d4f9f71f0b3413310d421e6396baa23
More information about the Libc-alpha
mailing list