summaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-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 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;