From 334950e4b352ffa3a672f30f62b478c69690c830 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 16 Jan 2019 13:06:10 +0100 Subject: [PATCH 96/99] KCM: Return a valid tevent error code if a request cannot be created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously we were returning whatever was in 'ret' which is wrong, typically it would have been EOK as returned from a previous successfull call or even an uninitialized value. Reviewed-by: Michal Židek Reviewed-by: Simo Sorce --- 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 9352909f4..60b5677e9 100644 --- a/src/responder/kcm/kcmsrv_ops.c +++ b/src/responder/kcm/kcmsrv_ops.c @@ -527,7 +527,7 @@ static void kcm_op_initialize_create_step(struct tevent_req *req) state->op_ctx->client, state->new_cc); if (subreq == NULL) { - tevent_req_error(req, ret); + tevent_req_error(req, ENOMEM); return; } tevent_req_set_callback(subreq, kcm_op_initialize_cc_create_done, req); -- 2.19.1