Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2015 07:21:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 201730] usr/src/usr.sbin/edquota/edquota.c: multiple resource leak ?
Message-ID:  <bug-201730-8@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 201730
           Summary: usr/src/usr.sbin/edquota/edquota.c: multiple resource
                    leak ?
           Product: Base System
           Version: 10.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: dcb314@hotmail.com

1.

[usr/src/usr.sbin/edquota/edquota.c:558]: (error) Resource leak: fd

    while (fgets(line1, sizeof (line1), fd) != NULL &&
           fgets(line2, sizeof (line2), fd) != NULL) {
        if ((fsp = strtok(line1, " \t:")) == NULL) {
            warnx("%s: bad format", line1);
            return (0);
        }

More of the same in the while loop.

2.

[usr/src/usr.sbin/edquota/edquota.c:736]: (error) Resource leak: fd

    while (fgets(line1, sizeof (line1), fd) != NULL) {
        if ((fsp = strtok(line1, " \t:")) == NULL) {
            warnx("%s: bad format", line1);
            return (0);
        }

Similar code to the above case.

-- 
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-201730-8>