Re: Possible memory leak in function (acpi_video_init_brightness) not freeing (br->levels)

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

 



On Wednesday, November 19, 2014 08:13:13 PM Ahmed Tamrawi wrote:
> Bug Report Filed: https://bugzilla.kernel.org/show_bug.cgi?id=88531
> Linux Version [3.17-rc1]
> Configuration: Default configuration for x86
> 
> Reference to source code:
> http://lxr.free-electrons.com/source/drivers/acpi/video.c#L1033
> 
> In function (acpi_video_init_brightness) in file (drivers/acpi/video.c):
> 
> The function allocates (br->levels) pointer at line (1033) and frees
> it on some paths at line (1137). However, the problem occurs when the
> function returns from line (1134) where the pointer (br->levels) is
> not freed. Thus, causing a memory leak when the function returns from
> line (1134).

That is success path for the function and so we retain br->levels. If you
notice, we do not free 'br' itself there either.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux