This commit: commit 7cd553356e3fe10bf4caac23d525df235ad9efce Author: Andreas Schneider <anschneider@suse.de> Date: Tue Jul 15 14:57:32 2008 +0200 Release still reachable memory if the smbclient context is freed. Signed-off-by: Andreas Schneider <anschneider@suse.de> (cherry picked from commit 88c9cf2fdc8f3d704f7f27c25ef6dc6940d451d3) seems to be incorrect. It assumes that only one smbclient context is in use at a time, and frees global resources. A test case showing the problem can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=458790#c0 It creates and frees two smbclient contexts. Creating the second context causes a segmentation fault.
Got it - thanks. I'll add a refcount here. Jeremy.
Created attachment 3467 [details] Patch Here is a patch to allow many subsystems to be re-initialized. The only functional change I made was to remove the null context tracking, as the memory allocated here is designed to be left for the complete lifetime of the program. Freeing this early (when all smb contexts are destroyed) could crash other users of talloc. Jeremy.
Thanks, Jeremy.
Fixed for 3.2.2. Jeremy.