macvlan: Fix leak and NULL dereference on error path
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 22 Apr 2014 09:15:34 +0000 (17:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Apr 2014 18:55:30 +0000 (14:55 -0400)
commite676f197a7a9aae9c75b0d9acc97e07de07dd1f0
treedb202a9e7297998bde3b43e6cd94092d7c942a25
parent2abf967b9304bdc0f6e2b42d4e7a25c3556c0fc4
macvlan: Fix leak and NULL dereference on error path

The recent patch that moved broadcasts to process context added
a couple of bugs on the error path where we may dereference NULL
or leak an skb.  This patch fixes them.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c