https://github.com/python/cpython/commit/1a73d5a35c6da2b8e45df027b5313ac4e82a7390 commit: 1a73d5a35c6da2b8e45df027b5313ac4e82a7390 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: kumaraditya303 <[email protected]> date: 2026-03-08T13:32:39+05:30 summary:
[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 0aeaaafac476119f242fe717ce60d2070172127b) Co-authored-by: Pieter Eendebak <[email protected]> files: M Modules/_queuemodule.c diff --git a/Modules/_queuemodule.c b/Modules/_queuemodule.c index 5c995cf68334e6..9f1c9a1b0d4283 100644 --- a/Modules/_queuemodule.c +++ b/Modules/_queuemodule.c @@ -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; } } _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
