nsswitch pam_winbind: Fix Asan use after free
commit385a36b7e7cb20e4cb25d03b84611dff85922a49
authorGary Lockyer <gary@catalyst.net.nz>
Wed, 17 Apr 2019 21:29:28 +0000 (18 09:29 +1200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 16 May 2019 10:37:54 +0000 (16 10:37 +0000)
tree0f5b18ac7c5042262bd6d3fc9b61e92d4d6afc9d
parent52ba5136f2f0107650f2dfe187bffa3f5d0918f3
nsswitch pam_winbind: Fix Asan use after free

Fix use after free condition detected by Address Sanitizer triggered by
wbcLogonUserInfoDestructor, wbcFreeMemory has code to detect and prevent a
double free.  This patch prevents the Address Sanitizer error, allowing
tests to be run with Address Sanitizer enabled.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May  6 08:55:22 UTC 2019 on sn-devel-184

(cherry picked from commit 193b44466ba05deba8f2b1fdc16ab55c102e82ad)
nsswitch/pam_winbind.c