NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/50712: src/usr.bin/showmount/showmount.c: many memory leaks ?



>Number:         50712
>Category:       bin
>Synopsis:       src/usr.bin/showmount/showmount.c: many memory leaks ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 26 09:20:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160125
>Organization:
>Environment:
>Description:
1.

src/usr.bin/showmount/showmount.c:335]: (error) Memory leak: ep

       if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN))
            return (0);

2.

src/usr.bin/showmount/showmount.c:344]: (error) Memory leak: gp

          if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN))
                return (0);

However, a close examination of the function xdr_exports shows
many places where a return is made in the middle of the function,
without any calls to free.


>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index