summaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r--gdb/python/py-objfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 8ac93f9f6f3..694fa09f272 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -445,9 +445,9 @@ objfpy_add_separate_debug_file (PyObject *self, PyObject *args, PyObject *kw)
TRY
{
- bfd *abfd = symfile_bfd_open (file_name);
+ gdb_bfd_ref_ptr abfd (symfile_bfd_open (file_name));
- symbol_file_add_separate (abfd, file_name, 0, obj->objfile);
+ symbol_file_add_separate (abfd.get (), file_name, 0, obj->objfile);
}
CATCH (except, RETURN_MASK_ALL)
{