Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2014 21:34:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 195128] Memory leaks in lib/libpam/modules due to memory handling with login_getcapstr, et al
Message-ID:  <bug-195128-8-wVTP4pMEHg@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-195128-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-195128-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195128

--- Comment #5 from darius@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195128-8-wVTP4pMEHg>