mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
Fix crasher in ldap_domain2dn()
This commit is contained in:
parent
dd3279eab0
commit
a4ace0ba68
@ -141,7 +141,8 @@ int ldap_domain2dn(
|
|||||||
size_t len = strlen(s);
|
size_t len = strlen(s);
|
||||||
|
|
||||||
dntmp = (char *) LDAP_REALLOC(dn, loc + sizeof(",dc=") + len );
|
dntmp = (char *) LDAP_REALLOC(dn, loc + sizeof(",dc=") + len );
|
||||||
if (dn == NULL) {
|
if (dntmp == NULL) {
|
||||||
|
if (dn != NULL)
|
||||||
LDAP_FREE(dn);
|
LDAP_FREE(dn);
|
||||||
LDAP_FREE(domain);
|
LDAP_FREE(domain);
|
||||||
return LDAP_NO_MEMORY;
|
return LDAP_NO_MEMORY;
|
||||||
|
Loading…
Reference in New Issue
Block a user