git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
018595e
)
s3: Fix Coverity ID 2336, NULL_RETURNS
author
Volker Lendecke
<vl@samba.org>
Fri, 22 Apr 2011 07:48:10 +0000
(09:48 +0200)
committer
Volker Lendecke
<vl@samba.org>
Fri, 22 Apr 2011 08:06:36 +0000
(10:06 +0200)
source3/libads/ldap.c
patch
|
blob
|
history
diff --git
a/source3/libads/ldap.c
b/source3/libads/ldap.c
index 3ce7a7e869a185a53bef7742b22a5af98259f9c7..90c645c44ad6546006d04ffc59e623baa7878352 100644
(file)
--- 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) {