s4-dsdb: Use tmp_ctx in kccsrv_check_deleted to avoid leaking memory onto part->dn
authorAndrew Bartlett <abartlet@samba.org>
Fri, 17 Aug 2012 13:04:56 +0000 (23:04 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 17 Aug 2012 16:24:09 +0000 (18:24 +0200)
commit2e1ab13f6ebb2c2cf746457d4783fe9bc5e86de0
tree8d5f677fc4e480c9e505f20b6b05db4e34677ac5
parent26bfe70def9905674c74bfe6f9d687b243af4891
s4-dsdb: Use tmp_ctx in kccsrv_check_deleted to avoid leaking memory onto part->dn

The confusing use of do_dn as a memory context while legitimate
created a bug when it was copied and modified to search on a DN from
long-term state.

By always using a temporary memory context it is clear what paramter
is the memory context.

This was found based on a log provided by Ricky Nance
<ricky.nance@weaubleau.k12.mo.us>.  Thanks Ricky!

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 17 18:24:10 CEST 2012 on sn-devel-104
source4/dsdb/kcc/kcc_deleted.c