From: Neal Norwitz Date: Fri, 9 Aug 2002 03:37:42 +0000 (+0000) Subject: SF bug #592645 fix memory leak in socket.getaddrinfo X-Git-Tag: v2.3c1~4596 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90128ba22c9dc3b4335053d6251afee78f0f93e2;p=thirdparty%2FPython%2Fcpython.git SF bug #592645 fix memory leak in socket.getaddrinfo --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 616c8362ee12..7461f60fa327 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2704,6 +2704,8 @@ socket_getaddrinfo(PyObject *self, PyObject *args) goto err; Py_XDECREF(single); } + if (res0) + freeaddrinfo(res0); return all; err: Py_XDECREF(single);