36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From 3cba6d1153c102f9596335db28cc017e8338e868 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Alejandro=20L=C3=B3pez?= <allopez@redhat.com>
|
|
Date: Fri, 3 Nov 2023 15:31:46 +0100
|
|
Subject: [PATCH] KCM: Fixed a wrong check
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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>
|
|
---
|
|
src/responder/kcm/kcmsrv_ops.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/responder/kcm/kcmsrv_ops.c b/src/responder/kcm/kcmsrv_ops.c
|
|
index 33d7cd506..dab96b486 100644
|
|
--- a/src/responder/kcm/kcmsrv_ops.c
|
|
+++ b/src/responder/kcm/kcmsrv_ops.c
|
|
@@ -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;
|
|
}
|
|
--
|
|
2.33.0
|
|
|