Normally last_file is freed inside report(), but in the case of a bad
file mapping we don't call report.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2016-04-14 Mark Wielaard <mjw@redhat.com>
+
+ * linux-proc-maps.c (proc_maps_report): Free last_file on bad file
+ mapping.
+
2016-03-01 Steven Chamberlain <steven@pyro.eu.org>
* linux-pid-attach.c: Removed unused pid_thread_callbacks,
{
/* This is another portion of the same file's mapping. */
if (strcmp (last_file, file) != 0)
- goto bad_report;
+ {
+ free (last_file);
+ goto bad_report;
+ }
high = end;
}
else