mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-06 12:01:08 +03:00
support: Fix FILE * leak in check_for_unshare_hints in test-container
The file opened via fopen is never closed.
This commit is contained in:
@@ -705,6 +705,7 @@ check_for_unshare_hints (int require_pidns)
|
|||||||
|
|
||||||
val = -1; /* Sentinel. */
|
val = -1; /* Sentinel. */
|
||||||
int cnt = fscanf (f, "%d", &val);
|
int cnt = fscanf (f, "%d", &val);
|
||||||
|
fclose (f);
|
||||||
if (cnt == 1 && val != files[i].bad_value)
|
if (cnt == 1 && val != files[i].bad_value)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user