mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
I spotted a few cases where the return value of PyObject_New was not being checked against nullptr, but we were dereferencing the result. All fixed here. The fixed functions can now return NULL, so I checked all the callers, and I believe there will handle a return of NULL correctly. Assuming calls to PyObject_New never fail, there should be no user visible changes after this commit. No tests here as I don't know how we'd go about causing a Python object allocation to fail. Approved-By: Simon Marchi <simon.marchi@efficios.com>