Skip to content
Snippets Groups Projects
Commit a4ace0ba authored by Luke Howard's avatar Luke Howard
Browse files

Fix crasher in ldap_domain2dn()

parent dd3279ea
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,8 @@ int ldap_domain2dn(
size_t len = strlen(s);
dntmp = (char *) LDAP_REALLOC(dn, loc + sizeof(",dc=") + len );
if (dn == NULL) {
if (dntmp == NULL) {
if (dn != NULL)
LDAP_FREE(dn);
LDAP_FREE(domain);
return LDAP_NO_MEMORY;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment