Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2015 07:27:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 201731] usr/src/sys/arm/samsung/exynos/chrome_ec.c:160: memory leaks ?
Message-ID:  <bug-201731-8@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 201731
           Summary: usr/src/sys/arm/samsung/exynos/chrome_ec.c:160: memory
                    leaks ?
           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

[usr/src/sys/arm/samsung/exynos/chrome_ec.c:160]: (error) Memory leak: msg_dout
[usr/src/sys/arm/samsung/exynos/chrome_ec.c:160]: (error) Memory leak: msg_dinp

Source code is

    msg_dout = malloc(dout_len + 4, M_DEVBUF, M_NOWAIT);
    msg_dinp = malloc(dinp_len + 4, M_DEVBUF, M_NOWAIT);

    if (ec_sc == NULL)
        return (-1);

Maybe better code

    if (ec_sc == NULL)
        return (-1);

    msg_dout = malloc(dout_len + 4, M_DEVBUF, M_NOWAIT);
    msg_dinp = malloc(dinp_len + 4, M_DEVBUF, M_NOWAIT);

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