From 898eb701893c3df1bd9f536c47555db39a10667c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 9 Jul 2012 11:41:23 -0400 Subject: Fix potential NULL-dereference Coverity #12800 --- src/responder/sudo/sudosrv_get_sudorules.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/responder/sudo/sudosrv_get_sudorules.c') diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c index 13e1224b4..10cef552f 100644 --- a/src/responder/sudo/sudosrv_get_sudorules.c +++ b/src/responder/sudo/sudosrv_get_sudorules.c @@ -448,7 +448,7 @@ sudosrv_dp_req_done(struct tevent_req *req) { struct dp_callback_ctx *cb_ctx = tevent_req_callback_data(req, struct dp_callback_ctx); - struct cli_ctx *cli_ctx = talloc_get_type(cb_ctx->cctx, struct cli_ctx); + struct cli_ctx *cli_ctx; errno_t ret; dbus_uint16_t err_maj; @@ -460,6 +460,7 @@ sudosrv_dp_req_done(struct tevent_req *req) talloc_free(req); return; } + cli_ctx = talloc_get_type(cb_ctx->cctx, struct cli_ctx); ret = sss_dp_get_sudoers_recv(cb_ctx->mem_ctx, req, &err_maj, &err_min, -- cgit