File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3863,20 +3863,22 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
3863
3863
arglen = PyTuple_Size (args );
3864
3864
switch (arglen ) {
3865
3865
case 2 :
3866
- PyArg_ParseTuple (args , "y*O:sendto" , & pbuf , & addro );
3866
+ if (!PyArg_ParseTuple (args , "y*O:sendto" , & pbuf , & addro )) {
3867
+ return NULL ;
3868
+ }
3867
3869
break ;
3868
3870
case 3 :
3869
- PyArg_ParseTuple (args , "y*iO:sendto" ,
3870
- & pbuf , & flags , & addro );
3871
+ if (!PyArg_ParseTuple (args , "y*iO:sendto" ,
3872
+ & pbuf , & flags , & addro )) {
3873
+ return NULL ;
3874
+ }
3871
3875
break ;
3872
3876
default :
3873
3877
PyErr_Format (PyExc_TypeError ,
3874
3878
"sendto() takes 2 or 3 arguments (%d given)" ,
3875
3879
arglen );
3876
3880
return NULL ;
3877
3881
}
3878
- if (PyErr_Occurred ())
3879
- return NULL ;
3880
3882
3881
3883
if (!IS_SELECTABLE (s )) {
3882
3884
PyBuffer_Release (& pbuf );
You can’t perform that action at this time.
0 commit comments