diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-12-29 05:05:32 +0100 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-12-29 05:05:32 +0100 |
commit | 527120be154dbdeffc0b623445efb9cd5c519206 (patch) | |
tree | 0ee7f957a6f34aa19ab4c994338e2197e09c1532 | |
parent | c92a71d35eb6f303550a2813d07a887e8841f4f8 (diff) | |
download | pygobject-527120be154dbdeffc0b623445efb9cd5c519206.tar.gz |
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).
-rw-r--r-- | gi/pygi-hashtable.c | 2 |
1 files changed, 0 insertions, 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; |