]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.2 patch 31: fix memory leak in optimized $(<file) expansion
authorChet Ramey <chet.ramey@case.edu>
Thu, 1 Aug 2024 15:37:23 +0000 (11:37 -0400)
committerChet Ramey <chet.ramey@case.edu>
Thu, 1 Aug 2024 15:37:23 +0000 (11:37 -0400)
builtins/evalstring.c
patchlevel.h

index df3dd68e2a7e27d9403cc0d8fff274f949b6e0d1..53a7c0b87c904f28bd7dda87188662ce5499e4b3 100644 (file)
@@ -762,6 +762,9 @@ open_redir_file (r, fnp)
 
   if (fnp)
     *fnp = fn;
+  else
+    free (fn);
+
   return fd;
 }
 
index 5998c62ff41cccc94a7107ba17442e3d3fa5ee0a..db0de52dfd937a5ee8ca07d46a55ce1fd29c7fb3 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 30
+#define PATCHLEVEL 31
 
 #endif /* _PATCHLEVEL_H_ */