]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128452: fix warning in socketmodule.c (#129478)
authorKumar Aditya <kumaraditya@python.org>
Fri, 31 Jan 2025 08:11:11 +0000 (13:41 +0530)
committerGitHub <noreply@github.com>
Fri, 31 Jan 2025 08:11:11 +0000 (13:41 +0530)
Modules/socketmodule.c

index 01811afa578119199341e5965231c0974e9a44e3..b178eb42ac8e6ab83062f8edb18c49854d4c6c31 100644 (file)
@@ -2952,6 +2952,8 @@ sock_accept(PyObject *self, PyObject *Py_UNUSED(ignored))
 
     ctx.addrlen = &addrlen;
     ctx.addrbuf = &addrbuf;
+    ctx.result = INVALID_SOCKET;
+
     if (sock_call(s, 0, sock_accept_impl, &ctx) < 0)
         return NULL;
     newfd = ctx.result;