summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/sdap_sudo.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 2c6c7712e..c4f422ed6 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -615,9 +615,8 @@ static void sdap_sudo_full_refresh_done(struct tevent_req *subreq)
ret = sdap_sudo_refresh_recv(state, subreq, &state->dp_error,
&state->error, &highest_usn, NULL);
talloc_zfree(subreq);
- if (ret != EOK) {
- tevent_req_error(req, ret);
- return;
+ if (ret != EOK || state->dp_error != DP_ERR_OK || state->error != EOK) {
+ goto done;
}
state->sudo_ctx->full_refresh_done = true;
@@ -639,6 +638,12 @@ static void sdap_sudo_full_refresh_done(struct tevent_req *subreq)
sdap_sudo_set_usn(state->id_ctx->srv_opts, highest_usn);
}
+done:
+ if (ret != EOK) {
+ tevent_req_error(req, ret);
+ return;
+ }
+
tevent_req_done(req);
}