gdb-server: fixed initialization of flash segments
@@ -820,7 +820,8 @@ static int flash_add_block(stm32_addr_t addr, unsigned length, stlink_t *sl) {
new->next = flash_root;
new->addr = addr;
new->length = length;
- new->data = calloc(length, 1);
+ new->data = malloc(length);
+ memset(new->data, stlink_get_erased_pattern(sl), length);
flash_root = new;
return(0);
