Skip to content

Commit

Permalink
KCM: Fixed a wrong check
Browse files Browse the repository at this point in the history
The pointer to the newly allocated iobuffer is stored into
state->op_ctx->reply but the check for NULL is done on state->reply,
which we already know is not NULL because it was checked before and
not modified after that.

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 3cba6d1)
  • Loading branch information
aplopez authored and pbrezina committed Nov 28, 2023
1 parent 8c83234 commit 855d046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/responder/kcm/kcmsrv_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ struct tevent_req *kcm_cmd_send(TALLOC_CTX *mem_ctx,
state,
KCM_REPLY_MAX - 2*sizeof(uint32_t),
KCM_REPLY_MAX - 2*sizeof(uint32_t));
if (state->reply == NULL) {
if (state->op_ctx->reply == NULL) {
ret = ENOMEM;
goto immediate;
}
Expand Down

0 comments on commit 855d046

Please sign in to comment.