From: Michael Snyder Date: Sun, 27 Feb 2011 23:32:04 +0000 (+0000) Subject: 2011-02-27 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9130f83ec812cc215a1c1d22451c8b80005c7f4d;p=binutils-gdb.git 2011-02-27 Michael Snyder * hostio.c (require_data): Free malloc memory before returning error. --- 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 + + * hostio.c (require_data): Free malloc memory before returning + error. + 2011-02-26 Michael Snyder * 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;