mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 12:46:14 +02:00
tools: mkeficapsule: resource leak in read_bin_file()
Free the allocated buffer in case of an error.
Fixes: 9e63786e2b4b ("tools: mkeficapsule: rework the code a little bit")
Addresses-Coverity-ID: 345917 Resource leak
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
123cd77122
commit
e16646c0ad
@ -168,6 +168,7 @@ static int read_bin_file(char *bin, uint8_t **data, off_t *bin_size)
|
||||
if (size < bin_stat.st_size) {
|
||||
fprintf(stderr, "read failed (%zx)\n", size);
|
||||
ret = -1;
|
||||
free(buf);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user