From bb01da776d7ff0386261285613f950cbc1e28215 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 13 Sep 2008 17:28:56 +0000 Subject: [PATCH] * symfile.c (build_id_verify): Free 'found'. (find_separate_debug_file): Use xfree, not free. --- gdb/ChangeLog | 5 +++++ gdb/symfile.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3a6dcea209a..35985a52081 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-09-13 Tom Tromey + + * symfile.c (build_id_verify): Free 'found'. + (find_separate_debug_file): Use xfree, not free. + 2008-09-12 Doug Evans * corefile.c (write_memory): Remove unnecessary copying. diff --git a/gdb/symfile.c b/gdb/symfile.c index 5827a53eb76..ae45f546bd1 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) { -- 2.30.2