Skip to content
Commit 2203718c authored by Georgi Valkov's avatar Georgi Valkov Committed by David S. Miller
Browse files

usbnet: ipheth: fix risk of NULL pointer deallocation



The cleanup precedure in ipheth_probe will attempt to free a
NULL pointer in dev->ctrl_buf if the memory allocation for
this buffer is not successful. While kfree ignores NULL pointers,
and the existing code is safe, it is a better design to rearrange
the goto labels and avoid this.

Signed-off-by: default avatarGeorgi Valkov <gvalkov@gmail.com>
Signed-off-by: default avatarFoster Snowhill <forst@pen.gy>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd5f4d7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment