aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-09-13 17:28:56 +0000
committerTom Tromey <tromey@redhat.com>2008-09-13 17:28:56 +0000
commitbb01da776d7ff0386261285613f950cbc1e28215 (patch)
treef85d203722adec8a286a1b25bf6c13e9d472e703 /gdb/symfile.c
parent126db58b149f1bb21498c8d2f940acfeab5fedab (diff)
downloadgdb-bb01da776d7ff0386261285613f950cbc1e28215.zip
gdb-bb01da776d7ff0386261285613f950cbc1e28215.tar.gz
gdb-bb01da776d7ff0386261285613f950cbc1e28215.tar.bz2
* symfile.c (build_id_verify): Free 'found'.
(find_separate_debug_file): Use xfree, not free.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 5827a53..ae45f54 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1227,6 +1227,9 @@ build_id_verify (const char *filename, struct build_id *check)
if (!bfd_close (abfd))
warning (_("cannot close \"%s\": %s"), filename,
bfd_errmsg (bfd_get_error ()));
+
+ xfree (found);
+
return retval;
}
@@ -1355,7 +1358,7 @@ find_separate_debug_file (struct objfile *objfile)
char *build_id_name;
build_id_name = build_id_to_debug_filename (build_id);
- free (build_id);
+ xfree (build_id);
/* Prevent looping on a stripped .debug file. */
if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
{