Skip to content

Commit ba36d01

Browse files
committed
error check
1 parent a7142d5 commit ba36d01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Modules/_functoolsmodule.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,10 @@ partial_vectorcall(partialobject *pto, PyObject *const *args,
449449
if (pto_kw == NULL) {
450450
pto_kw = PyDict_Copy(pto->kw);
451451
}
452-
PyDict_SetItem(pto_kw, key, val);
452+
if (PyDict_SetItem(pto_kw, key, val)) {
453+
DEALLOCATE_STACK(small_kwtail, kwtail);
454+
return NULL;
455+
}
453456
}
454457
else {
455458
kwtail[n_tail] = key;

0 commit comments

Comments
 (0)