summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/target/target.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/target.c b/src/target/target.c
index 82cbbff5..3c85502e 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2643,9 +2643,6 @@ COMMAND_HANDLER(handle_dump_image_command)
address += this_run_size;
}
- if ((retvaltemp = fileio_close(&fileio)) != ERROR_OK)
- return retvaltemp;
-
if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK))
{
int filesize;
@@ -2657,6 +2654,9 @@ COMMAND_HANDLER(handle_dump_image_command)
duration_elapsed(&bench), duration_kbps(&bench, filesize));
}
+ if ((retvaltemp = fileio_close(&fileio)) != ERROR_OK)
+ return retvaltemp;
+
return retval;
}