summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-03-05 00:11:46 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-03-05 17:36:21 +0100
commit1402e7140d143aaf48224c23182c2c12c2a89cd7 (patch)
tree9f429e9d36b60f522c5b87ff654c2be896222f78 /src
parent6d678b590c0fca3f942e6ab1e4b6156d478a97e9 (diff)
downloadsssd-1402e7140d143aaf48224c23182c2c12c2a89cd7.tar.gz
sssd-1402e7140d143aaf48224c23182c2c12c2a89cd7.tar.xz
sssd-1402e7140d143aaf48224c23182c2c12c2a89cd7.zip
Check the return value of sysdb_search_services
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_reinit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_reinit.c b/src/providers/ldap/sdap_reinit.c
index 3fba9360b..b273c1a66 100644
--- a/src/providers/ldap/sdap_reinit.c
+++ b/src/providers/ldap/sdap_reinit.c
@@ -165,6 +165,12 @@ static errno_t sdap_reinit_clear_usn(struct sysdb_ctx *sysdb,
/* reset services' usn */
ret = sysdb_search_services(tmp_ctx, sysdb, domain,
"", attrs, &msgs_num, &msgs);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Cannot search services [%d]: %s\n", ret, strerror(ret)));
+ goto done;
+ }
+
sdap_delete_msgs_usn(sysdb, msgs, msgs_num);
talloc_zfree(msgs);
msgs_num = 0;