diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-14 08:44:09 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-14 08:44:09 +0000 |
commit | c5e51bca0aa711c6110e9ff6d0289eff24cf35eb (patch) | |
tree | 847c6651ed5b652200a2e7658f2c65cc9d8fac69 | |
parent | 3d4e32bc9a50b17e153d7bdd40e854f872eb32f8 (diff) | |
download | openocd+libswd-c5e51bca0aa711c6110e9ff6d0289eff24cf35eb.tar.gz openocd+libswd-c5e51bca0aa711c6110e9ff6d0289eff24cf35eb.tar.bz2 openocd+libswd-c5e51bca0aa711c6110e9ff6d0289eff24cf35eb.tar.xz openocd+libswd-c5e51bca0aa711c6110e9ff6d0289eff24cf35eb.zip |
propagate error in dump_image. If an error occurs during dump_image, a tcl exception is thrown.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1782 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/target/target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/target.c b/src/target/target.c index 68fad2fe..a0cbf85c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2158,10 +2158,10 @@ static int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cm if (retval==ERROR_OK) { command_print(cmd_ctx, "dumped %"PRIi64" byte in %s", fileio.size, duration_text); + free(duration_text); } - free(duration_text); - return ERROR_OK; + return retval; } static int handle_verify_image_command_internal(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, int verify) |