From ac47519148406c07c968732b83bdf7f7b272d15c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 18 Jun 2013 18:42:09 +0000 Subject: * python/python.c (finish_python_initialization): Decref 'pythondir' on failure path as well. --- gdb/python/python.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/python') 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; -- cgit v1.1