1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

ldap_server: Fix CID 1435731 Unchecked return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke
2018-05-22 13:25:41 +02:00
committed by Jeremy Allison
parent c8b4f31105
commit 312faa0b82

View File

@ -494,9 +494,17 @@ static bool ldapsrv_call_read_next(struct ldapsrv_connection *conn)
return false;
}
if (!timeval_is_zero(&conn->limits.endtime)) {
tevent_req_set_endtime(subreq,
conn->connection->event.ctx,
conn->limits.endtime);
bool ok;
ok = tevent_req_set_endtime(subreq,
conn->connection->event.ctx,
conn->limits.endtime);
if (!ok) {
ldapsrv_terminate_connection(
conn,
"ldapsrv_call_read_next: "
"no memory for tevent_req_set_endtime");
return false;
}
}
tevent_req_set_callback(subreq, ldapsrv_call_read_done, conn);
conn->sockets.read_req = subreq;