From: Howard Chu Date: Wed, 2 Jan 2002 09:59:37 +0000 (+0000) Subject: Fix ldap_str2rdn, make sure to update progress pointer; don't X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~372 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=81e9e86861377bd8bd540a89bcb5ab2955a709b8;p=openldap Fix ldap_str2rdn, make sure to update progress pointer; don't free attrType since we never allocate it --- diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 8be043f9d6..41db8756bd 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -1178,12 +1178,10 @@ ldap_str2rdn( const char *str, LDAPRDN **rdn, const char **n, unsigned flags ) goto parsing_error; } } + *n = p; parsing_error:; /* They are set to NULL after they're used in an AVA */ - if ( attrType.bv_val ) { - free( attrType.bv_val ); - } if ( attrValue.bv_val ) { free( attrValue.bv_val ); @@ -1195,7 +1193,7 @@ parsing_error:; return_result:; Debug( LDAP_DEBUG_TRACE, "<= ldap_str2rdn(%*s)=%d\n", - *n - p, str, rc ); + p - str, str, rc ); if ( rdn ) { *rdn = newRDN; }