From 06c5f96b49e37f31a7d0824ae3c47e6029c24506 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julio=20S=C3=A1nchez=20Fern=C3=A1ndez?= Date: Fri, 28 May 1999 18:51:21 +0000 Subject: [PATCH] safe_string_free was freeing the string value, so we have to save it. --- libraries/libldap/schema.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.5