aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/python/python.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 16fc351..c162970 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-06-18 Tom Tromey <tromey@redhat.com>
+ * python/python.c (finish_python_initialization): Decref
+ 'pythondir' on failure path as well.
+
+2013-06-18 Tom Tromey <tromey@redhat.com>
+
PR symtab/15391:
* dwarf2loc.c (read_pieced_value): Truncate this_size_bits
after taking bits_to_skip into account. Sign extend byte_offset.
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;