|
From: oharboe at B. <oh...@ma...> - 2009-05-14 10:44:10
|
Author: oharboe
Date: 2009-05-14 10:44:09 +0200 (Thu, 14 May 2009)
New Revision: 1782
Modified:
trunk/src/target/target.c
Log:
propagate error in dump_image. If an error occurs during dump_image, a tcl exception is thrown.
Modified: trunk/src/target/target.c
===================================================================
--- trunk/src/target/target.c 2009-05-13 23:38:38 UTC (rev 1781)
+++ trunk/src/target/target.c 2009-05-14 08:44:09 UTC (rev 1782)
@@ -2158,10 +2158,10 @@
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)
|