summaryrefslogtreecommitdiffstats
path: root/bindings/lang_python_wrapper_top.c
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/lang_python_wrapper_top.c')
-rw-r--r--bindings/lang_python_wrapper_top.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bindings/lang_python_wrapper_top.c b/bindings/lang_python_wrapper_top.c
index 10ce0352..2ae93296 100644
--- a/bindings/lang_python_wrapper_top.c
+++ b/bindings/lang_python_wrapper_top.c
@@ -75,6 +75,7 @@ get_dict_from_hashtable_of_strings(GHashTable *value)
if (item_value) {
item = PyString_FromString(item_value);
PyDict_SetItemString(dict, (char*)keys->data, item);
+ Py_DECREF(item);
} else {
PyDict_SetItemString(dict, (char*)keys->data, Py_None);
}
@@ -100,6 +101,7 @@ get_dict_from_hashtable_of_objects(GHashTable *value)
if (item_value) {
item = PyGObjectPtr_New(G_OBJECT(item_value));
PyDict_SetItemString(dict, (char*)keys->data, item);
+ Py_DECREF(item);
} else {
PyDict_SetItemString(dict, (char*)keys->data, Py_None);
}