diff options
author | Paul Koning <pkoning@equallogic.com> | 2011-09-15 18:33:15 +0000 |
---|---|---|
committer | Paul Koning <pkoning@equallogic.com> | 2011-09-15 18:33:15 +0000 |
commit | 5af65ec072edf782b67169fd3ea1b91b8255d30f (patch) | |
tree | f85ac04dc8ea2ca2d5f9d9c35b51863663c7c936 /gdb/python/py-cmd.c | |
parent | 883640a804647cb6c54766eca0a4e40ccf808386 (diff) | |
download | gdb-5af65ec072edf782b67169fd3ea1b91b8255d30f.zip gdb-5af65ec072edf782b67169fd3ea1b91b8255d30f.tar.gz gdb-5af65ec072edf782b67169fd3ea1b91b8255d30f.tar.bz2 |
* python/py-cmd.c (gdbpy_string_to_argv): Decrement reference
count of item appended to list.
* python/py-type.c (typy_fields): Likewise.
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); |