[Bug 195128] Memory leaks in lib/libpam/modules due to memory handling with login_getcapstr, et al

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Nov 18 21:34:45 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195128

--- Comment #5 from darius at dons.net.au ---
It would appear to lie also, or at least I can't work out how it would free
anything :)

int
cgetclose(void)
{
        if (pfp != NULL) {
                (void)fclose(pfp);
                pfp = NULL;
        }
        dbp = NULL;
        gottoprec = 0;
        slash = 0;
        return(0);
}

int
cgetstr(char *buf, const char *cap, char **str)
{
...
        if ((mem = malloc(SFRAG)) == NULL) {
                errno = ENOMEM;
                return (-2);    /* couldn't even allocate the first fragment */
        }
...

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list