mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
lib/slre: Fix memory leak if regex compilation fails
Signed-off-by: Francois Berder <fberder@outlook.fr>
This commit is contained in:
parent
9f0588a1a9
commit
891b178c57
1 changed files with 1 additions and 0 deletions
|
@ -686,6 +686,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!slre_compile(&slre, argv[1])) {
|
if (!slre_compile(&slre, argv[1])) {
|
||||||
|
(void) fclose(fp);
|
||||||
fprintf(stderr, "Error compiling slre: %s\n", slre.err_str);
|
fprintf(stderr, "Error compiling slre: %s\n", slre.err_str);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue