File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ What's New in Python 3.3.1?
1212Core and Builtins
1313-----------------
1414
15+ - Issue #17328: Fix possible refleak in dict.setdefault.
16+
1517- Issue #17223: array module: Fix a crasher when converting an array containing
1618 invalid characters (outside range [U+0000; U+10ffff]) to Unicode:
1719 repr(array), str(array) and array.tounicode(). Patch written by Manuel Jacob.
Original file line number Diff line number Diff line change @@ -2230,14 +2230,14 @@ dict_setdefault(register PyDictObject *mp, PyObject *args)
22302230 return NULL ;
22312231 val = * value_addr ;
22322232 if (val == NULL ) {
2233- Py_INCREF (failobj );
2234- Py_INCREF (key );
22352233 if (mp -> ma_keys -> dk_usable <= 0 ) {
22362234 /* Need to resize. */
22372235 if (insertion_resize (mp ) < 0 )
22382236 return NULL ;
22392237 ep = find_empty_slot (mp , key , hash , & value_addr );
22402238 }
2239+ Py_INCREF (failobj );
2240+ Py_INCREF (key );
22412241 MAINTAIN_TRACKING (mp , key , failobj );
22422242 ep -> me_key = key ;
22432243 ep -> me_hash = hash ;
You can’t perform that action at this time.
0 commit comments