summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_sudo.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 636eae41b..82c8e9374 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -782,8 +782,7 @@ static void sdap_sudo_rules_refresh_done(struct tevent_req *subreq)
&highest_usn, &downloaded_rules_num);
talloc_zfree(subreq);
if (ret != EOK || state->dp_error != DP_ERR_OK || state->error != EOK) {
- tevent_req_error(req, ret);
- return;
+ goto done;
}
/* set highest usn */
@@ -795,6 +794,12 @@ static void sdap_sudo_rules_refresh_done(struct tevent_req *subreq)
state->error = ENOENT;
}
+done:
+ if (ret != EOK) {
+ tevent_req_error(req, ret);
+ return;
+ }
+
tevent_req_done(req);
}
@@ -912,8 +917,7 @@ static void sdap_sudo_smart_refresh_done(struct tevent_req *subreq)
ret = sdap_sudo_refresh_recv(state, subreq, &dp_error, &error,
&highest_usn, NULL);
if (ret != EOK || dp_error != DP_ERR_OK || error != EOK) {
- tevent_req_error(req, ret);
- return;
+ goto done;
}
DEBUG(SSSDBG_TRACE_FUNC, ("Successful smart refresh of sudo rules\n"));
@@ -923,6 +927,12 @@ static void sdap_sudo_smart_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);
}