diff options
author | Tim Newsome <tim@sifive.com> | 2019-01-07 12:15:18 -0800 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2019-01-07 12:15:18 -0800 |
commit | f9af0b6cca392116d15cb0b3f48cd7ba55420131 (patch) | |
tree | 3b2eca51623b6f739ce17e6650abaf080e60ca9d /src | |
parent | 4bb8bd005c27c3ee7ac0ee3adb0046428e3f1868 (diff) | |
download | riscv-openocd-f9af0b6cca392116d15cb0b3f48cd7ba55420131.zip riscv-openocd-f9af0b6cca392116d15cb0b3f48cd7ba55420131.tar.gz riscv-openocd-f9af0b6cca392116d15cb0b3f48cd7ba55420131.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/server/gdb_server.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 3548f16..b95c1ec 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -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; } |