After I set up a new mail server, I started seeing this kind of messages when switching to the root user with
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
After a bit of digging around it was clear this was related to the Samba PAM module.
There are 2 options to get rid of the message:
1. Remove the module
apt-get remove libpam-smbpass
2. Change PAM authentication settings
and disable the option “SMB password synchronization”.