flash/nor/tcl: Fix memory leak of flash bank name
Change-Id: I54cd1ee479a0570ae849a71be47c82eebd1ae454 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8303 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
parent
0a3217b8ff
commit
1fba55a9b6
|
@ -1298,6 +1298,7 @@ COMMAND_HANDLER(handle_flash_bank_command)
|
||||||
if (retval != ERROR_OK) {
|
if (retval != ERROR_OK) {
|
||||||
LOG_ERROR("'%s' driver rejected flash bank at " TARGET_ADDR_FMT
|
LOG_ERROR("'%s' driver rejected flash bank at " TARGET_ADDR_FMT
|
||||||
"; usage: %s", driver_name, c->base, driver->usage);
|
"; usage: %s", driver_name, c->base, driver->usage);
|
||||||
|
free(c->name);
|
||||||
free(c);
|
free(c);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue