From: Victor Stinner Date: Fri, 19 Sep 2025 09:30:11 +0000 (+0100) Subject: gh-129813, PEP 782: Fix refleak in sock_recvfrom() (GH-139151) X-Git-Tag: v3.15.0a1~259 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47485c03843e0a1b0bb8d55d260cd5e5ca08dbe9;p=thirdparty%2FPython%2Fcpython.git gh-129813, PEP 782: Fix refleak in sock_recvfrom() (GH-139151) --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 8be06bddf3d0..92e6be68192d 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -4191,6 +4191,7 @@ sock_recvfrom(PyObject *self, PyObject *args) } ret = PyTuple_Pack(2, buf, addr); + Py_DECREF(buf); finally: Py_XDECREF(addr);