From: Luke Howard Date: Thu, 10 Oct 2002 08:59:19 +0000 (+0000) Subject: Fix crasher in ldap_domain2dn() X-Git-Tag: NO_SLAP_OP_BLOCKS~894 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a4ace0ba685e987886dfe6bb986ab1475a8573dd;p=openldap Fix crasher in ldap_domain2dn() --- diff --git a/libraries/libldap/dnssrv.c b/libraries/libldap/dnssrv.c index ef5eb89d3b..69a7ec5bb3 100644 --- a/libraries/libldap/dnssrv.c +++ b/libraries/libldap/dnssrv.c @@ -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;