From: Julio Sánchez Fernández Date: Fri, 28 May 1999 18:51:21 +0000 (+0000) Subject: safe_string_free was freeing the string value, so we have to save it. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~493 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=06c5f96b49e37f31a7d0824ae3c47e6029c24506;p=openldap safe_string_free was freeing the string value, so we have to save it. --- diff --git a/libraries/libldap/schema.c b/libraries/libldap/schema.c index e404a32724..3722c16a9d 100644 --- a/libraries/libldap/schema.c +++ b/libraries/libldap/schema.c @@ -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); }