From: Luke Howard Date: Fri, 2 Jan 2004 06:34:50 +0000 (+0000) Subject: Fix previous commit X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~63 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=31026020026dd5f41978b2a5b9e3169f6d74d9f3;p=openldap Fix previous commit --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index de62de247f..9a1fc49b32 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -309,7 +309,12 @@ slapi_entry_attr_get_charptr( const Slapi_Entry *e, const char *type ) } if ( attr->a_vals != NULL && attr->a_vals[0].bv_len != 0 ) { - return (char *)slapi_value_get_string( attr->a_vals ); + const char *p; + + p = slapi_value_get_string( &attr->a_vals[0] ); + if ( p != NULL ) { + return slapi_ch_strdup( (char *)p ); + } } return NULL;