Skip to content

Commit f7febaa

Browse files
bdracoasvetlov
andauthored
Fix ref leak when calling update (#1135)
fixes #1134 appears to be introduced in #234 (4.4.0) --------- Co-authored-by: Andrew Svetlov <[email protected]>
1 parent 9850454 commit f7febaa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGES/1135.bugfix.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed reference counting when calling :py:meth:`multidict.MultiDict.update` -- by :user:`bdraco`.
2+
3+
The leak was introduced in 4.4.0

multidict/_multilib/pair_list.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,7 @@ _dict_set_number(PyObject *dict, PyObject *key, Py_ssize_t num)
10151015
return -1;
10161016
}
10171017

1018+
Py_DECREF(tmp);
10181019
return 0;
10191020
}
10201021

0 commit comments

Comments
 (0)