]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Fix 'inet6_rtm_getroute' to release 'rt->dst' in case of 'alloc_skb' failure
authorShmulik Ladkani <shmulik.ladkani@gmail.com>
Tue, 3 Apr 2012 23:13:00 +0000 (23:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Apr 2012 09:25:51 +0000 (05:25 -0400)
commit05c42fe621c84dc44a73ba27f200b3c97d5d6f9e
treeb092c689b8afed67395efbb61fd8f01d3770f8c8
parent4313f969f47dfce1b0e226d01ff19f8964e1cb71
ipv6: Fix 'inet6_rtm_getroute' to release 'rt->dst' in case of 'alloc_skb' failure

In d6e36b3 [ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be
consistent with ipv4] the code of 'inet6_rtm_getroute()' was re-ordered
such that the reference to 'rt->dst' is incremented prior skb
allocation.

Hence, if 'alloc_skb()' fails, must drop a reference from 'rt->dst'.
Add the missing 'dst_release()' call.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c