From: Bruno Haible Date: Wed, 22 Oct 2025 02:06:05 +0000 (-0700) Subject: posix: Fix memory leak a memory leak in glob. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1eba0b35ad3e860a0d4fae12579e8399355eee44;p=thirdparty%2Fglibc.git posix: Fix memory leak a memory leak in glob. Found by Coverity in Gnulib. * posix/glob.c (__glob): Add scratch_buffer_free invocation, to match scratch_buffer_init invocation. Reviewed-by: Collin Funk --- diff --git a/posix/glob.c b/posix/glob.c index 0c86d26972..846528e252 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -886,6 +886,7 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { /* We have to regard it as an error if we cannot find the home directory. */ + scratch_buffer_free (&pwtmpbuf); retval = GLOB_NOMATCH; goto out; }