mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
Fix latent bug in gdbpy_lookup_static_symbols
gdbpy_lookup_static_symbols is missing an error check for the case where symbol_to_symbol_object returns NULL. Approved-By: Tom de Vries <tdevries@suse.de>
This commit is contained in:
@@ -632,10 +632,11 @@ gdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
|
|||||||
|
|
||||||
if (symbol != nullptr)
|
if (symbol != nullptr)
|
||||||
{
|
{
|
||||||
PyObject *sym_obj
|
PyObject *sym_obj = symbol_to_symbol_object (symbol);
|
||||||
= symbol_to_symbol_object (symbol);
|
if (sym_obj == nullptr)
|
||||||
|
return nullptr;
|
||||||
if (PyList_Append (return_list.get (), sym_obj) == -1)
|
if (PyList_Append (return_list.get (), sym_obj) == -1)
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user