summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2011-02-27 23:32:04 +0000
committerMichael Snyder <msnyder@specifix.com>2011-02-27 23:32:04 +0000
commit36485ab775bc9a758b40b8e3e77e0690f79d49e0 (patch)
tree0a7e6efe62a32d60b4df08e27a11850e4d791e3a /gdb/gdbserver
parent925f5671e74998e94cd128e02179d48204b060dc (diff)
downloadgdb-36485ab775bc9a758b40b8e3e77e0690f79d49e0.tar.gz
2011-02-27 Michael Snyder <msnyder@vmware.com>
* hostio.c (require_data): Free malloc memory before returning error.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/hostio.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 1aaf401006c..62c612ca288 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-27 Michael Snyder <msnyder@vmware.com>
+
+ * hostio.c (require_data): Free malloc memory before returning
+ error.
+
2011-02-26 Michael Snyder <msnyder@vmware.com>
* linux-low.c (list_threads): Call closedir for dirent.
diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c
index 99014bcdeb2..df4cc7885fc 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;