diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-02-15 19:07:43 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-02-15 19:07:43 +0000 |
commit | 8f773624324a69473d0160b6918feea300714e64 (patch) | |
tree | d35d2e9ca45f43e8be13ec1658c770eb103a81e4 | |
parent | 04cf548bff3c5e94e7cf991413c57dc56e75e8cf (diff) | |
download | riscv-openocd-8f773624324a69473d0160b6918feea300714e64.zip riscv-openocd-8f773624324a69473d0160b6918feea300714e64.tar.gz riscv-openocd-8f773624324a69473d0160b6918feea300714e64.tar.bz2 |
- fix xscale memory leak and warnings. Thanks Øyvind Harboe
git-svn-id: svn://svn.berlios.de/openocd/trunk@297 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/target/xscale.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c index ec49a8c..f652ee3 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -1014,7 +1014,7 @@ int xscale_debug_entry(target_t *target) armv4_5_common_t *armv4_5 = target->arch_info; xscale_common_t *xscale = armv4_5->arch_info; u32 pc; - u32 *buffer = malloc(4 * 10); + u32 buffer[10]; int i; u32 moe; @@ -1199,7 +1199,7 @@ int xscale_halt(target_t *target) { /* this must not happen for a xscale target */ ERROR("target was in unknown state when halt was requested"); - exit(-1); + return ERROR_TARGET_INVALID; } else if (target->state == TARGET_RESET) { @@ -2269,7 +2269,7 @@ int xscale_set_watchpoint(struct target_s *target, watchpoint_t *watchpoint) { armv4_5_common_t *armv4_5 = target->arch_info; xscale_common_t *xscale = armv4_5->arch_info; - u8 enable; + u8 enable = 0; reg_t *dbcon = &xscale->reg_cache->reg_list[XSCALE_DBCON]; u32 dbcon_value = buf_get_u32(dbcon->value, 0, 32); |