]> granicus.if.org Git - python/commitdiff
Fix NULL check in sock_sendmsg_iovec. CID 1372885
authorChristian Heimes <christian@python.org>
Tue, 13 Sep 2016 08:07:16 +0000 (10:07 +0200)
committerChristian Heimes <christian@python.org>
Tue, 13 Sep 2016 08:07:16 +0000 (10:07 +0200)
Modules/socketmodule.c

index eee607fd1392d10dace816a53898ebfb91f32551..e87f790fb0b1939fe2a1583f9d41a8aeee652eb6 100644 (file)
@@ -3943,7 +3943,7 @@ sock_sendmsg_iovec(PySocketSockObject *s, PyObject *data_arg,
         msg->msg_iov = iovs;
 
         databufs = PyMem_New(Py_buffer, ndataparts);
-        if (iovs == NULL) {
+        if (databufs == NULL) {
             PyErr_NoMemory();
             goto finally;
         }