diff options
| author | yuxiaojun <[email protected]> | 2023-08-28 15:24:14 +0800 |
|---|---|---|
| committer | yuxiaojun <[email protected]> | 2023-08-28 15:24:14 +0800 |
| commit | c35061603836353e2e13c7bceafdafced1785dde (patch) | |
| tree | 8d1f799310e1a1699d93cd91a7421f3c0d13d0bd | |
| parent | 7bf5923052e5861f54c9cb0581e328f8be26a0a9 (diff) | |
fix:Resource leak: fp
Signed-off-by: yuxiaojun <[email protected]>
| -rw-r--r-- | hw/mcu/sony/cxd56/mkspk/mkspk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/mcu/sony/cxd56/mkspk/mkspk.c b/hw/mcu/sony/cxd56/mkspk/mkspk.c index c447ad7da..3feb235f6 100644 --- a/hw/mcu/sony/cxd56/mkspk/mkspk.c +++ b/hw/mcu/sony/cxd56/mkspk/mkspk.c @@ -172,6 +172,7 @@ static struct elf_file *load_elf(const char *filename) ef = (struct elf_file *)malloc(sizeof(*ef)); if (!ef) { + fclose(fp); return NULL; } @@ -182,6 +183,7 @@ static struct elf_file *load_elf(const char *filename) buf = (char *)malloc(fsize); if (!buf) { + fclose(fp); return NULL; } |
