Files
binutils-gdb/gdb/python/py-disasm.c
Tom Tromey 9dbbe5c948 Fix two Python calls that don't check for errors
PyModule_AddObject steals a reference on success, but not on error,
which is why we have gdb_pymodule_addobject.  I found one spot still
calling the former, which could in theory leak memory on failure.
This patch fixes this.

In the same function I found an unchecked call to
PyDict_SetItemString.  This patch fixes this as well.

Approved-By: Andrew Burgess <aburgess@redhat.com>
2023-07-03 11:35:18 -06:00

62 KiB