Skip to content

Commit 37c5e50

Browse files
committed
Fix refleak in _queuemodule.c
1 parent 6acaf65 commit 37c5e50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_queuemodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ RingBuf_Put(RingBuf *buf, PyObject *item)
165165
// Buffer is full, grow it.
166166
if (resize_ringbuf(buf, buf->items_cap * 2) < 0) {
167167
PyErr_NoMemory();
168+
Py_DECREF(item);
168169
return -1;
169170
}
170171
}

0 commit comments

Comments
 (0)