aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/hostio.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/hostio.c')
-rw-r--r--gdb/gdbserver/hostio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c
index 99014bc..df4cc78 100644
--- a/gdb/gdbserver/hostio.c
+++ b/gdb/gdbserver/hostio.c
@@ -134,7 +134,10 @@ require_data (char *p, int p_len, char **data, int *data_len)
}
if (escaped)
- return -1;
+ {
+ xfree (data);
+ return -1;
+ }
*data_len = output_index;
return 0;