mirror of
https://github.com/python/cpython.git
synced 2026-04-14 07:41:00 +00:00
[3.13] gh-145376: Fix refleak in queuemodule.c out-of-memory path (GH-145543) (#145621)
gh-145376: Fix refleak in `queuemodule.c` out-of-memory path (GH-145543)
(cherry picked from commit 0aeaaafac4)
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
This commit is contained in:
parent
26d587b395
commit
1a73d5a35c
1 changed files with 1 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ RingBuf_Put(RingBuf *buf, PyObject *item)
|
|||
// Buffer is full, grow it.
|
||||
if (resize_ringbuf(buf, buf->items_cap * 2) < 0) {
|
||||
PyErr_NoMemory();
|
||||
Py_DECREF(item);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue