File: Modules/LDAPObject.c
Function: l_ldap_search_ext
Error: returning (PyObject*)NULL without setting an exception
1045 static PyObject*
1046 l_ldap_search_ext( LDAPObject* self, PyObject* args )
1047 {
1048     char *base;
1049     int scope;
1050     char *filter;
1051     PyObject *attrlist = Py_None;
1052     char **attrs;
1053     int attrsonly = 0;
1054 
1055     PyObject *serverctrls = Py_None;
1056     PyObject *clientctrls = Py_None;
1057     LDAPControl** server_ldcs = NULL;
1058     LDAPControl** client_ldcs = NULL;
1059 
1060     double timeout = -1.0;
1061     struct timeval tv;
1062     struct timeval* tvp;
1063 
1064     int sizelimit = 0;
1065 
1066     int msgid;
1067     int ldaperror;
1068 
1069     if (!PyArg_ParseTuple( args, "sis|OiOOdi",
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
1070                            &base, &scope, &filter, &attrlist, &attrsonly,
1071                            &serverctrls, &clientctrls, &timeout, &sizelimit )) return NULL;
1072     if (not_valid(self)) return NULL;
when considering value == (int)0 from Modules/LDAPObject.c:1072
taking False path
1073 
1074     if (!attrs_from_List( attrlist, &attrs )) 
when considering range: -0x80000000 <= value <= -1
taking False path
1075          return NULL;
1076 
1077     if (timeout >= 0) {
taking True path
1078         tvp = &tv;
1079         set_timeval_from_double( tvp, timeout );
1080     } else {
1081         tvp = NULL;
1082     }
1083 
1084     if (!PyNone_Check(serverctrls)) {
taking True path
1085         if (!LDAPControls_from_object(serverctrls, &server_ldcs))
when considering range: 1 <= value <= 0x7fffffff
taking False path
1086             return NULL;
1087     }
1088 
1089     if (!PyNone_Check(clientctrls)) {
taking True path
1090         if (!LDAPControls_from_object(clientctrls, &client_ldcs))
when considering value == (int)0 from Modules/LDAPObject.c:1090
taking True path
1091             return NULL;
1092     }
1093 
1094     LDAP_BEGIN_ALLOW_THREADS( self );
1095     ldaperror = ldap_search_ext( self->ldap, base, scope, filter, attrs, attrsonly,
1096                              server_ldcs, client_ldcs, tvp, sizelimit, &msgid );
1097     LDAP_END_ALLOW_THREADS( self );
1098 
1099     free_attrs( &attrs );
1100     LDAPControl_List_DEL( server_ldcs );
1101     LDAPControl_List_DEL( client_ldcs );
1102 
1103     if ( ldaperror!=LDAP_SUCCESS )
1104         return LDAPerror( self->ldap, "ldap_search_ext" );
1105 
1106     return PyInt_FromLong( msgid );
1107 }       
returning (PyObject*)NULL without setting an exception
found 3 similar trace(s) to this