librpc/rpc/pipe_handle.c
authorStefan Metzmacher <metze@samba.org>
Sat, 21 Sep 2013 06:11:22 +0000 (08:11 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 11:14:55 +0000 (13:14 +0200)
librpc/rpc/pipe_handle.c

index 30231c1ee3d9868f3f3539379b45a1f142350900..2bf67ae8e6c0a3b979c45366e60fc8fecd68090c 100644 (file)
@@ -158,7 +158,7 @@ struct dcerpc_pipe_handle_push_state {
 static int dcerpc_pipe_handle_push_state_destructor(
        struct dcerpc_pipe_handle_push_state *state)
 {
-       if (state->p) {
+       if (state->p != NULL) {
                state->p->current_req = NULL;
        }
 
@@ -226,6 +226,8 @@ static void dcerpc_pipe_handle_push_done(struct tevent_req *subreq)
 
        status = state->ops->chunk_push_recv(subreq);
        TALLOC_FREE(subreq);
+       state->p->current_req = NULL;
+       state->p = NULL;
        if (tevent_req_nterror(req, status)) {
                return;
        }
@@ -246,7 +248,7 @@ struct dcerpc_pipe_handle_pull_state {
 static int dcerpc_pipe_handle_pull_state_destructor(
        struct dcerpc_pipe_handle_pull_state *state)
 {
-       if (state->p) {
+       if (state->p != NULL) {
                state->p->current_req = NULL;
        }
 
@@ -315,6 +317,8 @@ static void dcerpc_pipe_handle_pull_done(struct tevent_req *subreq)
 
        status = state->ops->chunk_pull_recv(subreq);
        TALLOC_FREE(subreq);
+       state->p->current_req = NULL;
+       state->p = NULL;
        if (tevent_req_nterror(req, status)) {
                return;
        }