net: rtm_to_ifaddr: free ifa if ifa_cacheinfo processing fails
commit446266b0c742a2c9ee8f0dce759a0117bce58a86
authorDaniel Borkmann <dborkman@redhat.com>
Fri, 2 Aug 2013 09:32:43 +0000 (2 11:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Aug 2013 21:56:06 +0000 (2 14:56 -0700)
tree2ee287031900394357be6297c0729fcd49c196ee
parent9bb8eeb554795e6fac7cacf7af44bf413e75c9b9
net: rtm_to_ifaddr: free ifa if ifa_cacheinfo processing fails

Commit 5c766d642 ("ipv4: introduce address lifetime") leaves the ifa
resource that was allocated via inet_alloc_ifa() unfreed when returning
the function with -EINVAL. Thus, free it first via inet_free_ifa().

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c