]> git.sur5r.net Git - openldap/commitdiff
DNSSRV realloc fix
authorKurt Zeilenga <kurt@openldap.org>
Fri, 11 Oct 2002 01:38:34 +0000 (01:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 11 Oct 2002 01:38:34 +0000 (01:38 +0000)
libraries/libldap/dnssrv.c

index ef5eb89d3b8f58806d0cac45cb66430b2939e97d..69a7ec5bb39f4a3404b85027f4a4df7c504ab5c8 100644 (file)
@@ -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;