diff options
Diffstat (limited to 'gdb/python/py-cmd.c')
-rw-r--r-- | gdb/python/py-cmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 677c1e4..cfddff8 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -683,14 +683,12 @@ gdbpy_string_to_argv (PyObject *self, PyObject *args) if (argp == NULL || PyList_Append (py_argv, argp) < 0) { - if (argp != NULL) - { - Py_DECREF (argp); - } + Py_XDECREF (argp); Py_DECREF (py_argv); freeargv (c_argv); return NULL; } + Py_DECREF (argp); } freeargv (c_argv); |