summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-22 09:48:10 +0200
committerVolker Lendecke <vl@samba.org>2011-04-22 10:06:36 +0200
commitf9e3af71d391027de353f0240f70e425e766c0e5 (patch)
treec28888fc88b61947c3b6c65ab3d5b8d8bee57a9c
parent018595e2587b5b5dd90bf318a1cf8b675e47b66b (diff)
downloadsamba-f9e3af71d391027de353f0240f70e425e766c0e5.tar.gz
s3: Fix Coverity ID 2336, NULL_RETURNS
-rw-r--r--source3/libads/ldap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 3ce7a7e869a..90c645c44ad 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -3502,6 +3502,10 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname)
}
hostnameDN = ads_get_dn(ads, talloc_tos(), (LDAPMessage *)msg);
+ if (hostnameDN == NULL) {
+ SAFE_FREE(host);
+ return ADS_ERROR_SYSTEM(ENOENT);
+ }
rc = ldap_delete_ext_s(ads->ldap.ld, hostnameDN, pldap_control, NULL);
if (rc) {