Skip to content

Commit d16872a

Browse files
committed
Fix test_unicode()
1 parent b16ff9a commit d16872a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_pythoncapi_compat_cext.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,8 @@ test_unicode(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
14461446
}
14471447

14481448
PyObject *abc0def = PyUnicode_FromStringAndSize("abc\0def", 7);
1449-
if (abc == NULL) {
1449+
if (abc0def == NULL) {
1450+
Py_DECREF(abc);
14501451
return NULL;
14511452
}
14521453

0 commit comments

Comments
 (0)