Re: [PATCH net] net: rtm_to_ifaddr: free ifa if ifa_cacheinfo processing fails

Jiri Pirko
2013-08-02T10:22:33Z

Fri, Aug 02, 2013 at 11:32:43AM CEST, dborkman@redhat.com wrote:
>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>