diff options
Diffstat (limited to 'gdb/python')
| -rw-r--r-- | gdb/python/py-block.c | 3 | ||||
| -rw-r--r-- | gdb/python/py-record.c | 3 | ||||
| -rw-r--r-- | gdb/python/py-unwind.c | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c index fa7dd19..66ccad7 100644 --- a/gdb/python/py-block.c +++ b/gdb/python/py-block.c @@ -356,6 +356,9 @@ block_to_block_object (const struct block *block, struct objfile *objfile) } result = PyObject_New (block_object, &block_object_type); + if (result == nullptr) + return nullptr; + result->block = block; result->objfile = objfile; diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c index 7e7904b..89c2e77 100644 --- a/gdb/python/py-record.c +++ b/gdb/python/py-record.c @@ -696,6 +696,9 @@ gdbpy_current_recording (PyObject *self, PyObject *args) Py_RETURN_NONE; ret = PyObject_New (recpy_record_object, &recpy_record_type); + if (ret == nullptr) + return nullptr; + ret->thread = inferior_thread (); ret->method = target_record_method (ret->thread->ptid); diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index dc078ec..43125bb 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -287,6 +287,8 @@ pyuw_create_unwind_info (PyObject *pyo_pending_frame, unwind_info_object *unwind_info = PyObject_New (unwind_info_object, &unwind_info_object_type); + if (unwind_info == nullptr) + return nullptr; unwind_info->frame_id = frame_id; Py_INCREF (pyo_pending_frame); |
