Handler target_get_gdb_reg_list() better.
That function might change from NULL reg_list but then return failure. In that case reg_list shouldn't be freed. Change-Id: I5380630c871d056fb52e25bda16836e346bd74b2
This commit is contained in:
parent
4bb8bd005c
commit
f9af0b6cca
|
@ -2399,6 +2399,7 @@ static int gdb_target_description_supported(struct target *target, int *supporte
|
|||
®_list_size, REG_CLASS_ALL);
|
||||
if (retval != ERROR_OK) {
|
||||
LOG_ERROR("get register list failed");
|
||||
reg_list = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue