]> git.sur5r.net Git - openldap/commitdiff
fix memory leak (ITS#3669)
authorPierangelo Masarati <ando@openldap.org>
Tue, 19 Apr 2005 14:31:07 +0000 (14:31 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 19 Apr 2005 14:31:07 +0000 (14:31 +0000)
servers/slapd/back-meta/search.c

index 36254eeee3a483a0d9e185890f5a848890041559..43f5c2062c2c83f9daf565a30642c292c3183b01 100644 (file)
@@ -754,6 +754,7 @@ meta_send_entry(
                                        NULL );
                        }
                        BER_BVZERO( &attr->a_nvals[i] );
+
                } else {
                        attr->a_nvals = attr->a_vals;
                }
@@ -771,6 +772,9 @@ meta_send_entry(
                attr = ent.e_attrs;
                ent.e_attrs = attr->a_next;
                if ( attr->a_vals != &slap_dummy_bv ) {
+                       if ( attr->a_nvals != attr->a_vals ) {
+                               ber_bvarray_free( attr->a_nvals );
+                       }
                        ber_bvarray_free( attr->a_vals );
                }
                free( attr );