From: Tom Tromey Date: Tue, 18 Jun 2013 18:42:09 +0000 (+0000) Subject: * python/python.c (finish_python_initialization): Decref X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac47519148406c07c968732b83bdf7f7b272d15c;p=binutils-gdb.git * python/python.c (finish_python_initialization): Decref 'pythondir' on failure path as well. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 16fc3515442..c162970f3c3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-06-18 Tom Tromey + + * python/python.c (finish_python_initialization): Decref + 'pythondir' on failure path as well. + 2013-06-18 Tom Tromey PR symtab/15391: diff --git a/gdb/python/python.c b/gdb/python/python.c index c94198e2985..00092c739da 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1771,10 +1771,9 @@ finish_python_initialization (void) goto fail; err = PyList_Insert (sys_path, 0, pythondir); + Py_DECREF (pythondir); if (err) goto fail; - - Py_DECREF (pythondir); } else goto fail;