[PATCH] lib/slre: Fix memory leak if regex compilation fails

12 Nov
2023
12 Nov
'23
8:16 p.m.
Signed-off-by: Francois Berder fberder@outlook.fr --- lib/slre.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/slre.c b/lib/slre.c index e82a9e7635..e1a50443e0 100644 --- a/lib/slre.c +++ b/lib/slre.c @@ -686,6 +686,7 @@ int main(int argc, char *argv[]) }
if (!slre_compile(&slre, argv[1])) { + (void) fclose(fp); fprintf(stderr, "Error compiling slre: %s\n", slre.err_str); return 1; }
--
2.34.1

29 Nov
29 Nov
5:57 p.m.
On Sun, Nov 12, 2023 at 08:16:50PM +0100, Francois Berder wrote:
Signed-off-by: Francois Berder fberder@outlook.fr
Applied to u-boot/next, thanks!
--
Tom
531
Age (days ago)
548
Last active (days ago)
1 comments
2 participants
participants (2)
-
Francois Berder
-
Tom Rini