https://github.com/python/cpython/commit/25206173619f5f387c88eb258948adcfe66d4966
commit: 25206173619f5f387c88eb258948adcfe66d4966
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-01-26T21:15:21Z
summary:

gh-142037: Fix a refleak introduced in GH-142081 (GH-144256)

files:
M Objects/bytesobject.c

diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index b85cbfe43e11e0..00c1c63b8e01c6 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -1156,6 +1156,7 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t 
format_len,
         goto error;
     }
 
+    Py_XDECREF(key);
     if (args_owned) {
         Py_DECREF(args);
     }

_______________________________________________
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]

Reply via email to