* target.c (read_whatever_is_readable): Fix memory leak.
2011-03-08 Michael Snyder <msnyder@vmware.com>
+ * target.c (read_whatever_is_readable): Fix memory leak.
+
* i386-tdep.c (i386_process_record): Document fall through.
2011-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
/* If we previously failed to read 1 byte, nothing can be done here. */
if (end - begin <= 1)
- return;
+ {
+ xfree (buf);
+ return;
+ }
/* Check that either first or the last byte is readable, and give up
if not. This heuristic is meant to permit reading accessible memory
}
else
{
+ xfree (buf);
return;
}