On 6/1/2016 2:06 PM, Colin King wrote:
> From: Colin Ian King <colin.k...@canonical.com>
> 
> The current error handling in setup_hw_stats has a couple of issues.
> It is possible to generate a null pointer deference on the
> kfree of hsag->attrs[i] because two of the early error exit paths
> jump to the kfree when hsags NULL and not allocated. Fix this by
> moving the kfree on stats and jumping to that, avoiding the hsag
> freeing.
> 
> Secondly, there is a memory leak of stats if the hsag allocation
> fails; instead of returning, jump to the kfree on stats.
> 
> Signed-off-by: Colin Ian King <colin.k...@canonical.com>

Thanks, applied.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to