DLIST_REMOVE(c->searches.list, search);
- if (!cldap_recvfrom_setup(c)) {
- goto nomem;
- }
+ cldap_recvfrom_setup(c);
tevent_req_done(search->req);
- talloc_free(in);
return true;
nomem:
error:
status = map_nt_error_from_unix(in->recv_errno);
nterror:
+ TALLOC_FREE(in);
/* in connected mode the first pending search gets the error */
if (!c->connected) {
/* otherwise we just ignore the error */
if (!c->searches.list) {
goto done;
}
+ cldap_recvfrom_setup(c);
tevent_req_nterror(c->searches.list->req, status);
+ return true;
done:
- talloc_free(in);
+ TALLOC_FREE(in);
return false;
}