aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/python/py-block.c2
-rw-r--r--gdb/python/py-finishbreakpoint.c1
-rw-r--r--gdb/python/py-inferior.c1
-rw-r--r--gdb/python/py-lazy-string.c1
-rw-r--r--gdb/python/py-linetable.c1
-rw-r--r--gdb/python/py-symbol.c1
-rw-r--r--gdb/python/py-symtab.c1
-rw-r--r--gdb/python/py-type.c1
9 files changed, 21 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0e17d7c39d8..0dfc96ade11 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+2019-11-18 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * python/py-block.c (blpy_dealloc): Call tp_free.
+ (blpy_block_syms_dealloc): Likewise.
+ * python/py-finishbreakpoint.c (bpfinishpy_dealloc): Likewise.
+ * python/py-inferior.c (infpy_dealloc): Likewise.
+ * python/py-lazy-string.c (stpy_dealloc): Likewise.
+ * python/py-linetable.c (ltpy_iterator_dealloc): Likewise.
+ * python/py-symbol.c (sympy_dealloc): Likewise.
+ * python/py-symtab.c (stpy_dealloc): Likewise.
+ * python/py-type.c (typy_iterator_dealloc): Likewise.
+
2019-11-18 Christian Biesinger <cbiesinger@google.com>
* symtab.h (struct symbol) <owner>: Initialize explicitly in the
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 4dc47ff169d..54c3be9b1a4 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -276,6 +276,7 @@ blpy_dealloc (PyObject *obj)
if (block->next)
block->next->prev = block->prev;
block->block = NULL;
+ Py_TYPE (obj)->tp_free (obj);
}
/* Given a block, and a block_object that has previously been
@@ -370,6 +371,7 @@ blpy_block_syms_dealloc (PyObject *obj)
block_syms_iterator_object *iter_obj = (block_syms_iterator_object *) obj;
Py_XDECREF (iter_obj->source);
+ Py_TYPE (obj)->tp_free (obj);
}
/* Implementation of gdb.Block.is_valid (self) -> Boolean.
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index 7f818213bd2..fc20575aea6 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -83,6 +83,7 @@ bpfinishpy_dealloc (PyObject *self)
Py_XDECREF (self_bpfinish->function_value);
Py_XDECREF (self_bpfinish->return_type);
Py_XDECREF (self_bpfinish->return_value);
+ Py_TYPE (self)->tp_free (self);
}
/* Triggered when gdbpy_should_stop is about to execute the `stop' callback
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 28882221a90..d475263df99 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -856,6 +856,7 @@ infpy_dealloc (PyObject *obj)
return;
set_inferior_data (inf, infpy_inf_data_key, NULL);
+ Py_TYPE (obj)->tp_free (obj);
}
/* Clear the INFERIOR pointer in an Inferior object and clear the
diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c
index 87c6ceaf2a4..74f14a94eb9 100644
--- a/gdb/python/py-lazy-string.c
+++ b/gdb/python/py-lazy-string.c
@@ -156,6 +156,7 @@ stpy_dealloc (PyObject *self)
lazy_string_object *self_string = (lazy_string_object *) self;
xfree (self_string->encoding);
+ Py_TYPE (self)->tp_free (self);
}
/* Low level routine to create a <gdb.LazyString> object.
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index aa43d9e7c74..96a5d3515b6 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -369,6 +369,7 @@ ltpy_iterator_dealloc (PyObject *obj)
ltpy_iterator_object *iter_obj = (ltpy_iterator_object *) obj;
Py_DECREF (iter_obj->source);
+ Py_TYPE (obj)->tp_free (obj);
}
/* Return a reference to the line table iterator. */
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 647c54b0a5b..b112ce115f1 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -357,6 +357,7 @@ sympy_dealloc (PyObject *obj)
if (sym_obj->next)
sym_obj->next->prev = sym_obj->prev;
sym_obj->symbol = NULL;
+ Py_TYPE (obj)->tp_free (obj);
}
/* Implementation of
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index 15af3001505..49c6a0ac544 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -253,6 +253,7 @@ stpy_dealloc (PyObject *obj)
if (symtab->next)
symtab->next->prev = symtab->prev;
symtab->symtab = NULL;
+ Py_TYPE (obj)->tp_free (obj);
}
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index a2fca97a327..e4350993dd4 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -1325,6 +1325,7 @@ typy_iterator_dealloc (PyObject *obj)
typy_iterator_object *iter_obj = (typy_iterator_object *) obj;
Py_DECREF (iter_obj->source);
+ Py_TYPE (obj)->tp_free (obj);
}
/* Create a new Type referring to TYPE. */