]> git.sur5r.net Git - openldap/commitdiff
Fix ldap_str2rdn, make sure to update progress pointer; don't
authorHoward Chu <hyc@openldap.org>
Wed, 2 Jan 2002 09:59:37 +0000 (09:59 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 2 Jan 2002 09:59:37 +0000 (09:59 +0000)
free attrType since we never allocate it

libraries/libldap/getdn.c

index 8be043f9d667e35896be9fe427ed8016d9bf3c6c..41db8756bd3251ff0bd9e647055b65f33ca59fb3 100644 (file)
@@ -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;
        }