summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 31da4e4842d..37d98d984ea 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1553,8 +1553,9 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
return NULL;
}
+ cleanups = make_cleanup (xfree, debuglink);
dir = xstrdup (objfile->name);
- cleanups = make_cleanup (xfree, dir);
+ make_cleanup (xfree, dir);
terminate_after_last_dir_separator (dir);
canon_dir = lrealpath (dir);