Note that I am filing this bug against Rawhide since that's where I got the bits
installed on this machine, but it's pretty much a sure thing that the bugs for
which I'm supplying patches are also present in non-Rawhide releases, since I've
been seeing memory leaks in xscreensaver/pam for a Long Time.
I finally got annoyed enough by xscreensaver growing without bound as I use it
to lock/unlock the screen multiple times, that I put in the effort to track down
all the memory leaks causing this behavior. It appears that all of them were
inside pam, hence the attached patch, which fixes the following leaks:
* The macro which defines numerous thread-safe wrappers to various get*ent
functions does not free the buffer it had allocated if the function it's
* The pam_stack module allocates memory to hold a service name which is not freed.
* The pam_stack modules allocates memory to hold an environment list which is
not freed. Note that to fix this leak, I had to add a utility function for
freeing an environment list. Another version of this function was already
present in the pam_misc library, but since most pam programs don't link against
pam_misc, I didn't want to depend on that version of the function.
I have not sent this patch to the upstream maintainer, because Red Hat has made
so many patches to this package that I don't feel confident that my patches will
apply to the upstream source code.
Created attachment 92576 [details]
fix several memory leaks in pam
Jonathan - to which version of PAM (I know you specify Rawhide..) did you apply
these patches to?
Not sure. Probably pam-0.75-49.