aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-06-18 18:42:09 +0000
committerTom Tromey <tromey@redhat.com>2013-06-18 18:42:09 +0000
commitac47519148406c07c968732b83bdf7f7b272d15c (patch)
tree1ee1304fe85ede5ff408bcbc478014c6579a9f8f /gdb/python/python.c
parent6de7c271e1b4daf1e2cb9ed807cf953fb2e15d0d (diff)
downloadgdb-ac47519148406c07c968732b83bdf7f7b272d15c.zip
gdb-ac47519148406c07c968732b83bdf7f7b272d15c.tar.gz
gdb-ac47519148406c07c968732b83bdf7f7b272d15c.tar.bz2
* python/python.c (finish_python_initialization): Decref
'pythondir' on failure path as well.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r--gdb/python/python.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index c94198e..00092c7 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;