mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +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)
|
||||
{
|
||||
PyObject *sym_obj
|
||||
= symbol_to_symbol_object (symbol);
|
||||
PyObject *sym_obj = symbol_to_symbol_object (symbol);
|
||||
if (sym_obj == nullptr)
|
||||
return nullptr;
|
||||
if (PyList_Append (return_list.get (), sym_obj) == -1)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user