diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 2c7e2aea3..9a3f56172 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -447,6 +447,7 @@ int arm720t_target_command(struct command_context_s *cmd_ctx, char *cmd, char ** int chain_pos; char *variant = NULL; arm720t_common_t *arm720t = malloc(sizeof(arm720t_common_t)); + memset(arm720t, 0, sizeof(*arm720t)); if (argc < 4) { diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index d8d5e57ed..22064ea70 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -845,6 +845,7 @@ int arm7tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char * int chain_pos; char *variant = NULL; arm7tdmi_common_t *arm7tdmi = malloc(sizeof(arm7tdmi_common_t)); + memset(arm7tdmi, 0, sizeof(*arm7tdmi)); if (argc < 4) { diff --git a/src/target/arm920t.c b/src/target/arm920t.c index e9a109a59..43d48152d 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -714,6 +714,7 @@ int arm920t_target_command(struct command_context_s *cmd_ctx, char *cmd, char ** int chain_pos; char *variant = NULL; arm920t_common_t *arm920t = malloc(sizeof(arm920t_common_t)); + memset(arm920t, 0, sizeof(*arm920t)); if (argc < 4) { diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index afe9226c7..87603bca8 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -702,6 +702,7 @@ int arm926ejs_target_command(struct command_context_s *cmd_ctx, char *cmd, char int chain_pos; char *variant = NULL; arm926ejs_common_t *arm926ejs = malloc(sizeof(arm926ejs_common_t)); + memset(arm926ejs, 0, sizeof(*arm926ejs)); if (argc < 4) { diff --git a/src/target/arm966e.c b/src/target/arm966e.c index 4ba5d8526..2b3f86a40 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -125,6 +125,7 @@ int arm966e_target_command(struct command_context_s *cmd_ctx, char *cmd, char ** int chain_pos; char *variant = NULL; arm966e_common_t *arm966e = malloc(sizeof(arm966e_common_t)); + memset(arm966e, 0, sizeof(*arm966e)); if (argc < 4) { diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 595790bc9..0778c4b7f 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -988,6 +988,7 @@ int arm9tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char * int chain_pos; char *variant = NULL; arm9tdmi_common_t *arm9tdmi = malloc(sizeof(arm9tdmi_common_t)); + memset(arm9tdmi, 0, sizeof(*arm9tdmi)); if (argc < 4) { diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 91911f9ee..964c6b8c3 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1481,6 +1481,7 @@ int cortex_m3_target_command(struct command_context_s *cmd_ctx, char *cmd, char int chain_pos; char *variant = NULL; cortex_m3_common_t *cortex_m3 = malloc(sizeof(cortex_m3_common_t)); + memset(cortex_m3, 0, sizeof(*cortex_m3)); if (argc < 4) { diff --git a/src/target/feroceon.c b/src/target/feroceon.c index 5346a14d1..efe12896a 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -609,6 +609,7 @@ int feroceon_target_command(struct command_context_s *cmd_ctx, char *cmd, char * armv4_5_common_t *armv4_5; arm7_9_common_t *arm7_9; arm926ejs_common_t *arm926ejs = malloc(sizeof(arm926ejs_common_t)); + memset(arm926ejs, 0, sizeof(*arm926ejs)); if (argc < 4) { diff --git a/src/target/xscale.c b/src/target/xscale.c index 27cd75c8e..30b25cb73 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -3145,6 +3145,7 @@ int xscale_target_command(struct command_context_s *cmd_ctx, char *cmd, char **a int chain_pos; char *variant = NULL; xscale_common_t *xscale = malloc(sizeof(xscale_common_t)); + memset(xscale, 0, sizeof(*xscale)); if (argc < 5) {