I found the bug in the samba source in the file source3/libsmb/cliconnect.c:
NTSTATUS cli_tdis(struct cli_state *cli) { struct tevent_context *ev; struct tevent_req *req; NTSTATUS status = NT_STATUS_NO_MEMORY;
if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { return smb2cli_tdis(cli->conn, cli->timeout, cli->smb2.session, cli->smb2.tcon); }
if (smbXcli_conn_has_async_calls(cli->conn)) { return NT_STATUS_INVALID_PARAMETER; } ev = samba_tevent_context_init(talloc_tos()); if (ev == NULL) { goto fail; } req = cli_tdis_send(ev, ev, cli); if (req == NULL) { goto fail; } if (!tevent_req_poll_ntstatus(req, ev, &status)) { goto fail; } status = cli_tdis_recv(req); fail: TALLOC_FREE(ev); return status; }
when the ev allocation is not possible on the fail try to free up the unallocated memory. need to be reported to the samba team also.
I found the bug in the samba source in the file source3/ libsmb/ cliconnect. c:
NTSTATUS cli_tdis(struct cli_state *cli) NO_MEMORY;
{
struct tevent_context *ev;
struct tevent_req *req;
NTSTATUS status = NT_STATUS_
if (smbXcli_ conn_protocol( cli->conn) >= PROTOCOL_SMB2_02) { tdis(cli- >conn,
cli->timeout,
cli->smb2. session,
cli->smb2. tcon);
return smb2cli_
}
if (smbXcli_ conn_has_ async_calls( cli->conn) ) { INVALID_ PARAMETER; context_ init(talloc_ tos()); req_poll_ ntstatus( req, ev, &status)) {
return NT_STATUS_
}
ev = samba_tevent_
if (ev == NULL) {
goto fail;
}
req = cli_tdis_send(ev, ev, cli);
if (req == NULL) {
goto fail;
}
if (!tevent_
goto fail;
}
status = cli_tdis_recv(req);
fail:
TALLOC_FREE(ev);
return status;
}
when the ev allocation is not possible on the fail try to free up the unallocated memory.
need to be reported to the samba team also.