summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-11-18 21:21:04 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-11-29 14:22:10 -0500
commit2a79515b1cc6cd4839e5b10628b2ddbb1674033f (patch)
treec81262f52a312ecd7ecaf6012befdbfdfc4d16aa /src/providers
parent6fb75e297bf7fc83e3db1f5ae8560624656ef319 (diff)
downloadsssd-2a79515b1cc6cd4839e5b10628b2ddbb1674033f.tar.gz
sssd-2a79515b1cc6cd4839e5b10628b2ddbb1674033f.tar.bz2
sssd-2a79515b1cc6cd4839e5b10628b2ddbb1674033f.zip
Fix two small bugs in group dereferencing
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async_groups.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 11f6b5c7..ead3fd54 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -1938,7 +1938,10 @@ static struct tevent_req *sdap_nested_group_process_send(
if (sdap_has_deref_support(state->sh, state->opts)) {
state->derefctx = talloc_zero(state, struct sdap_deref_ctx);
- if (!state->derefctx) goto immediate;
+ if (!state->derefctx) {
+ ret = ENOMEM;
+ goto immediate;
+ }
ret = sysdb_attrs_get_string(group, SYSDB_ORIG_DN,
&state->derefctx->orig_dn);
@@ -2849,7 +2852,7 @@ static void sdap_nested_group_process_deref(struct tevent_req *subreq)
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
- } else if (ret == ENOENT || state->derefctx->deref_result == 0) {
+ } else if (ret == ENOENT || state->derefctx->deref_result == NULL) {
/* Nothing could be dereferenced. Done. */
tevent_req_done(req);
return;