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: [email protected]
          Reporter: [email protected]

[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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to