[pygobject/benzea/pypy-fixes: 10/11] hashtable: Fix refcount of key/value in error case when marshalling
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/benzea/pypy-fixes: 10/11] hashtable: Fix refcount of key/value in error case when marshalling
- Date: Sun, 27 Mar 2022 13:17:10 +0000 (UTC)
commit 48271527c58609481ace7cede7e75dd21be172bf
Author: Benjamin Berg <bberg redhat com>
Date: Wed Dec 29 05:05:32 2021 +0100
hashtable: Fix refcount of key/value in error case when marshalling
PyList_GET_ITEM only returns a borrowed reference. In the unlikely event
of an error converting the key or value, the reference would be
unintentionally decremented. This could cause random failures later on
(and was indeed causing the PyPy test to fail randomly later on).
gi/pygi-hashtable.c | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/gi/pygi-hashtable.c b/gi/pygi-hashtable.c
index 285eca19..971d8dc7 100644
--- a/gi/pygi-hashtable.c
+++ b/gi/pygi-hashtable.c
@@ -141,8 +141,6 @@ err:
/* FIXME: cleanup hash keys and values */
Py_XDECREF (py_key);
Py_XDECREF (py_value);
- Py_DECREF (py_keys);
- Py_DECREF (py_values);
g_hash_table_unref (hash_);
_PyGI_ERROR_PREFIX ("Item %i: ", i);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]