summaryrefslogtreecommitdiffstats
path: root/src/responder/sudo
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-07-09 11:41:23 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-09 13:49:21 -0400
commit898eb701893c3df1bd9f536c47555db39a10667c (patch)
tree174f885c19af88dd94a816925ffcf4d8aacac258 /src/responder/sudo
parent29bf02dbdd8168d7be04f4f15cff4321833a71c4 (diff)
downloadsssd-898eb701893c3df1bd9f536c47555db39a10667c.tar.gz
sssd-898eb701893c3df1bd9f536c47555db39a10667c.tar.xz
sssd-898eb701893c3df1bd9f536c47555db39a10667c.zip
Fix potential NULL-dereference
Coverity #12800
Diffstat (limited to 'src/responder/sudo')
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c3
1 files changed, 2 insertions, 1 deletions
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,