Edgar Grimberg fixes some memory handling issues and

a problem with arm7_9_debug_entry not executing a code path upon crashes.

git-svn-id: svn://svn.berlios.de/openocd/trunk@669 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-05-20 10:10:54 +00:00
parent 0989c374e9
commit 0485363c45
5 changed files with 48 additions and 12 deletions

View File

@@ -829,12 +829,15 @@ int handle_flash_write_bank_command(struct command_context_s *cmd_ctx, char *cmd
buffer = malloc(fileio.size);
if (fileio_read(&fileio, fileio.size, buffer, &buf_cnt) != ERROR_OK)
{
free(buffer);
fileio_close(&fileio);
return ERROR_OK;
}
retval = flash_driver_write(p, buffer, offset, buf_cnt);
free(buffer);
buffer = NULL;
duration_stop_measure(&duration, &duration_text);
if (retval!=ERROR_OK)