Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

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

 



On Wed, Nov 19, 2014 at 07:22:06PM -0600, Ahmed Tamrawi wrote:
> Bug Report Filed: https://bugzilla.kernel.org/show_bug.cgi?id=88521
> Linux Version [3.17-rc1]
> Configuration: Default configuration for x86
> 
> Function Source:
> http://lxr.free-electrons.com/source/drivers/usb/class/cdc-acm.c#L1404
> 
> In function (acm_probe) in file (drivers/usb/class/cdc-acm.c):
> 
> Pointer (acm->country_codes) gets allocated in line (1404) and freed
> in lines (1414, 1424) if the call to function (device_create_file)
> fails (i < 0). However, if the conditions at (1413 and 1422) evaluates
> to false, the function (acm_probe) exists without freeing the pointer
> (acm->country_codes). Thus, causing a memory leak.

Care to write up a patch for this fixing the problem and sending it in
the format described in Documentation/SubmittingPatches so we can apply
it?

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux