> -----Original Message-----
> From: Colin King [mailto:colin.k...@canonical.com]
> Sent: Saturday, March 25, 2017 10:27 AM
> To: KY Srinivasan <k...@microsoft.com>; Haiyang Zhang
> <haiya...@microsoft.com>; Stephen Hemminger <sthem...@microsoft.com>;
> de...@linuxdriverproject.org; netdev@vger.kernel.org
> Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org
> Subject: [PATCH] netvsc: fix dereference before null check errors
> 
> From: Colin Ian King <colin.k...@canonical.com>
> 
> ndev is being checked to see if it is a null pointer however before
> the null check ndev is being dereferenced; hence there is a potential
> null pointer dereference bug that needs fixing. Fix this by only
> dereferencing ndev after the null check.
> 
> Detected by CoverityScan, CID#1420760, CID#140761 ("Dereference
> before null check")
> 
> Signed-off-by: Colin Ian King <colin.k...@canonical.com>

Reviewed-by: Haiyang Zhang <haiya...@microsoft.com>

Thank you!

Reply via email to