From: Cong Wang Date: Tue, 3 Jun 2014 23:40:47 +0000 (-0700) Subject: rtnetlink: fix a memory leak when ->newlink fails X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~78^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e51fb152318ee6502a2d224771b0bbbbda046128;p=pandora-kernel.git rtnetlink: fix a memory leak when ->newlink fails It is possible that ->newlink() fails before registering the device, in this case we should just free it, it's safe to call free_netdev(). Fixes: commit 0e0eee2465df77bcec2 (net: correct error path in rtnl_newlink()) Cc: David S. Miller Cc: Eric Dumazet Signed-off-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- Reading git-diff-tree failed