Skip to content

Commit c8ada7e

Browse files
committed
call Py_INCREF after null check
1 parent f9a7458 commit c8ada7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zope/interface/_zope_interface_coptimizations.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,9 +2517,9 @@ _zic_module_exec(PyObject* module)
25172517
_zic_module_state* rec = _zic_state_init(module);
25182518

25192519
rec->adapter_hooks = PyList_New(0);
2520-
Py_INCREF(rec->adapter_hooks);
25212520
if (rec->adapter_hooks == NULL)
25222521
return -1;
2522+
Py_INCREF(rec->adapter_hooks);
25232523

25242524
#if USE_STATIC_TYPES
25252525

0 commit comments

Comments
 (0)