mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4/messaging: do not deref NULL state (CID 1437973)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
a82f924179
commit
597709aac9
@ -578,6 +578,10 @@ static void imessaging_post_handler(struct tevent_context *ev,
|
|||||||
struct imessaging_post_state *state = talloc_get_type_abort(
|
struct imessaging_post_state *state = talloc_get_type_abort(
|
||||||
private_data, struct imessaging_post_state);
|
private_data, struct imessaging_post_state);
|
||||||
|
|
||||||
|
if (state == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In usecases like using messaging_client_init() with irpc processing
|
* In usecases like using messaging_client_init() with irpc processing
|
||||||
* we may free the imessaging_context during the messaging handler.
|
* we may free the imessaging_context during the messaging handler.
|
||||||
@ -594,10 +598,6 @@ static void imessaging_post_handler(struct tevent_context *ev,
|
|||||||
imessaging_dgm_recv(ev, state->buf, state->buf_len, NULL, 0,
|
imessaging_dgm_recv(ev, state->buf, state->buf_len, NULL, 0,
|
||||||
state->msg_ctx);
|
state->msg_ctx);
|
||||||
|
|
||||||
if (state == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
state->busy_ref = NULL;
|
state->busy_ref = NULL;
|
||||||
TALLOC_FREE(state);
|
TALLOC_FREE(state);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user