ravb: Double free on error in ravb_start_xmit()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Apr 2017 10:46:56 +0000 (13:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Apr 2017 17:58:49 +0000 (13:58 -0400)
commit9199cb7677b388b42e3d95c755090dfc5ab2b11a
tree54b0803b91ac40300508aad3a0fb08c57d69fa9a
parentb40c5f4fde22fb98eff205b3aece05b471c24eed
ravb: Double free on error in ravb_start_xmit()

If skb_put_padto() fails then it frees the skb.  I shifted that code
up a bit to make my error handling a little simpler.

Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb_main.c