mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
cli_classic: fix memory leak
If parameter --wp-region is used and wp_region is allocated, free the last one at the exit of the application. Found-by: scan-build, clang v13.0.1 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Change-Id: I8520e302e9d63ed1215c5d9beb90a93fb52a91fe Reviewed-on: https://review.coreboot.org/c/flashrom/+/64351 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
This commit is contained in:
parent
dc6f7fb0a5
commit
2d9d88ed6c
@ -1100,6 +1100,7 @@ out:
|
|||||||
free(referencefile);
|
free(referencefile);
|
||||||
free(layoutfile);
|
free(layoutfile);
|
||||||
free(pparam);
|
free(pparam);
|
||||||
|
free(wp_region);
|
||||||
/* clean up global variables */
|
/* clean up global variables */
|
||||||
free((char *)chip_to_probe); /* Silence! Freeing is not modifying contents. */
|
free((char *)chip_to_probe); /* Silence! Freeing is not modifying contents. */
|
||||||
chip_to_probe = NULL;
|
chip_to_probe = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user