Commit c6f50f88 authored by Simon Marchi's avatar Simon Marchi
Browse files

Initialize variable in py_get_event_thread

The pythread variable could be used without being initialized, fix it by
initializing it to nullptr.


	* python/py-threadevent.c (py_get_event_thread): Initialize
parent 6518e656
2018-08-25 Simon Marchi <>
* python/py-threadevent.c (py_get_event_thread): Initialize
2018-08-24 Kevin Buettner <>
PR gdb/23021
......@@ -25,7 +25,7 @@
PyObject *
py_get_event_thread (ptid_t ptid)
PyObject *pythread;
PyObject *pythread = nullptr;
if (non_stop)
......@@ -36,7 +36,7 @@ py_get_event_thread (ptid_t ptid)
pythread = Py_None;
if (!pythread)
if (pythread == nullptr)
PyErr_SetString (PyExc_RuntimeError, "Could not find event thread");
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment