Re: [GIT PATCH 2/3] Resend : Fix memory leak in qcserial driver

Sergei Shtylyov
2011-03-29T11:23:39Z

Hello.

On 28-03-2011 21:38, Steven Hardy wrote:

Posting all 3 patches having the same sucject is not a good idea.

> Patch 2 of 3, addresses the problem where serial->private can end up pointing to freed memory in the event qcprobe fails & returns -ENODEV

You still didn't wrap the changelog text properly.

> Original description:
> 3 - Don't assign serial->private when doing the kzalloc or serial->private ends up pointing to freed memory in the event we return -ENODEV, instead call usb_set_serial_data(serial, data) at the end of the function, and only have one return-point.

WBR, Sergei