Fix memory leak in share mode locking.
commit37fa8a6470066fde2317bf76a7385f31135df737
authorHemanth Thummala <hemanth.thummala@nutanix.com>
Wed, 25 May 2016 06:15:04 +0000 (24 23:15 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 31 May 2016 06:58:22 +0000 (31 08:58 +0200)
tree0d1c776a1911501868c446374f1d0dcc8a4e5723
parent98b9ea21cba0598dcd203a8f0a5fb42164f2f197
Fix memory leak in share mode locking.

Not freeing up(and reparenting to NULL context) ndr buffer
used for TDB updates resulting in huge memory leak when there
in high volume of opens and closes happening on same object.

Free the buffer before reparenting its parent to NULL context.

https://bugzilla.samba.org/show_bug.cgi?id=11934

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Signed-off-by: Saji VR <saji.vr@nutanix.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 27 18:43:31 CEST 2016 on sn-devel-144

(cherry picked from commit 7a725eea25f905fc5f611e8f3d7cfe414d5cf913)
source3/locking/share_mode_lock.c