]> git.sur5r.net Git - openldap/commitdiff
safe_string_free was freeing the string value, so we have to save it.
authorJulio Sánchez Fernández <jsanchez@openldap.org>
Fri, 28 May 1999 18:51:21 +0000 (18:51 +0000)
committerJulio Sánchez Fernández <jsanchez@openldap.org>
Fri, 28 May 1999 18:51:21 +0000 (18:51 +0000)
libraries/libldap/schema.c

index e404a32724717ae0b9290723c49588d3f56ad420..3722c16a9d631ed026ea7b9bb2462cb9680bee56 100644 (file)
@@ -295,7 +295,7 @@ ldap_objectclass2str( LDAP_OBJECT_CLASS * oc )
        print_whsp(ss);
        print_literal(ss,")");
 
-       retstring = safe_string_val(ss);
+       retstring = strdup(safe_string_val(ss));
        safe_string_free(ss);
        return(retstring);
 }
@@ -394,7 +394,7 @@ ldap_attributetype2str( LDAP_ATTRIBUTE_TYPE * at )
        print_whsp(ss);
        print_literal(ss,")");
 
-       retstring = safe_string_val(ss);
+       retstring = strdup(safe_string_val(ss));
        safe_string_free(ss);
        return(retstring);
 }