s4-ldb: Implement ldb_msg_difference() function to accept a memory context from client
authorKamen Mazdrashki <kamenim@samba.org>
Fri, 16 Jul 2010 11:23:24 +0000 (14:23 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 19 Jul 2010 07:33:33 +0000 (17:33 +1000)
commit65b967a706bb4ee2da1d4211c31c91d31a81e8f1
treeb62d12c415762aa8fd846dc75f357dd1c2d11edf
parentc09dcb903cdc1a68f71e892501a450df31367a54
s4-ldb: Implement ldb_msg_difference() function to accept a memory context from client

Old implementation from ldb_msg_diff() was moved into
this this function but with changed interface
so that a memory context may be passed.

ldb_msg_diff() function is now based on ldb_msg_difference(),
which fixes a hidden leak - internal ldb_msg object
(returned from ldb_msg_canonicalize) wasn't freed
and stays attached to ldb_context for the connection lifetime.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/lib/ldb/common/ldb_msg.c
source4/lib/ldb/include/ldb.h