]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9924 slapo-deref: plug memleak
authorHoward Chu <hyc@openldap.org>
Thu, 29 Sep 2022 15:02:57 +0000 (16:02 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 3 Oct 2022 16:36:02 +0000 (16:36 +0000)
memory alloc'd by bvarray_dup must be freed by bvarray_free, not regular free.

servers/slapd/overlays/deref.c

index 89dc227f3ec95b212b1ba8a96625626992c3c8a5..93b7f69da80d9cab36d7b6e6b668b60e751f5a41 100644 (file)
@@ -439,7 +439,7 @@ deref_response( Operation *op, SlapReply *rs )
                                                rc = ber_printf( ber, "{O[W]}",
                                                        &dr->dr_spec.ds_attributes[ j ]->ad_cname,
                                                        dr->dr_vals[ i ].dv_attrVals[ j ] );
-                                               op->o_tmpfree( dr->dr_vals[ i ].dv_attrVals[ j ],
+                                               ber_bvarray_free_x( dr->dr_vals[ i ].dv_attrVals[ j ],
                                                        op->o_tmpmemctx );
                                        }
                                }