]> git.sur5r.net Git - openldap/commitdiff
Plug memleaks from -r1.45
authorHoward Chu <hyc@openldap.org>
Mon, 9 Sep 2002 00:55:52 +0000 (00:55 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 9 Sep 2002 00:55:52 +0000 (00:55 +0000)
servers/slapd/tools/slapadd.c

index 7e6470ca6f54a670d63d4eb5d679a92df356fb2c..81f81f3f4168f3e2f0bbf3db8d71e5784271416e 100644 (file)
@@ -188,7 +188,7 @@ main( int argc, char **argv )
                        if( attr_find( e->e_attrs, slap_schema.si_ad_creatorsName )
                                == NULL )
                        {
-                               ber_dupbv( &vals[0], &name );
+                               vals[0] = name;
                                vals[1].bv_len = 0;
                                vals[1].bv_val = NULL;
                                attr_merge( e, slap_schema.si_ad_creatorsName, vals);
@@ -197,7 +197,7 @@ main( int argc, char **argv )
                        if( attr_find( e->e_attrs, slap_schema.si_ad_modifiersName )
                                == NULL )
                        {
-                               ber_dupbv( &vals[0], &name );
+                               vals[0] = name;
                                vals[1].bv_len = 0;
                                vals[1].bv_val = NULL;
                                attr_merge( e, slap_schema.si_ad_modifiersName, vals);
@@ -206,7 +206,7 @@ main( int argc, char **argv )
                        if( attr_find( e->e_attrs, slap_schema.si_ad_createTimestamp )
                                == NULL )
                        {
-                               ber_dupbv( &vals[0], &timestamp );
+                               vals[0] = timestamp;
                                vals[1].bv_len = 0;
                                vals[1].bv_val = NULL;
                                attr_merge( e, slap_schema.si_ad_createTimestamp, vals );
@@ -215,7 +215,7 @@ main( int argc, char **argv )
                        if( attr_find( e->e_attrs, slap_schema.si_ad_modifyTimestamp )
                                == NULL )
                        {
-                               ber_dupbv( &vals[0], &timestamp );
+                               vals[0] = timestamp;
                                vals[1].bv_len = 0;
                                vals[1].bv_val = NULL;
                                attr_merge( e, slap_schema.si_ad_modifyTimestamp, vals );
@@ -224,7 +224,7 @@ main( int argc, char **argv )
                        if( attr_find( e->e_attrs, slap_schema.si_ad_entryCSN )
                                == NULL )
                        {
-                               ber_dupbv( &vals[0], &csn );
+                               vals[0] = csn;
                                vals[1].bv_len = 0;
                                vals[1].bv_val = NULL;
                                attr_merge( e, slap_schema.si_ad_entryCSN, vals );