flash/nor: missing fileio_close.
If the file read abnormally, need to close it which was opened before. Signed-off-by: panciyan <panciyan@eswincomputing.com> Change-Id: I6142f154741dcd38088b7add2793219ee4dd2ae9 Reviewed-on: https://review.openocd.org/c/openocd/+/7546 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
b939224ab6
commit
c1b14d678f
|
@ -814,6 +814,7 @@ COMMAND_HANDLER(handle_flash_write_bank_command)
|
|||
if (buf_cnt != length) {
|
||||
LOG_ERROR("Short read");
|
||||
free(buffer);
|
||||
fileio_close(fileio);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue