]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/entry.c
ITS#1882: fix typo
[openldap] / servers / slapd / entry.c
index b30598fab3bdf35ab0b45cfd25dc019ecfd21ddc..8a1106e9744bf75ff713cc40a974cdfc512c964c 100644 (file)
@@ -129,22 +129,21 @@ str2entry( char *s )
                        }
 
                        rc = dnPrettyNormal( NULL, &vals[0], &e->e_name, &e->e_nname );
-                       free( vals[0].bv_val );
                        if( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                                LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
                                        "entry %ld has invalid DN \"%s\"\n",
-                                       (long) e->e_id,
-                                       e->e_dn ? e->e_dn : "" ));
+                                       (long) e->e_id, vals[0].bv_val ));
 #else
                                Debug( LDAP_DEBUG_ANY, "str2entry: "
                                        "entry %ld has invalid DN \"%s\"\n",
-                                       (long) e->e_id,
-                                       e->e_dn ? e->e_dn : "", 0 );
+                                       (long) e->e_id, vals[0].bv_val, 0 );
 #endif
                                entry_free( e );
+                               free( vals[0].bv_val );
                                return NULL;
                        }
+                       free( vals[0].bv_val );
                        continue;
                }