This patch fixes a netns leak.
Fixes:
93edb8c7f94f ("gtp: reload GTPv1 header after pskb_may_pull()")
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
/* Check if there's an existing gtpX device to configure */
dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK]));
- if (dev == NULL)
+ if (dev == NULL) {
+ put_net(net);
return -ENODEV;
+ }
+ put_net(net);
return ipv4_pdp_add(dev, info);
}
/* Check if there's an existing gtpX device to configure */
dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK]));
- if (dev == NULL)
+ if (dev == NULL) {
+ put_net(net);
return -ENODEV;
+ }
+ put_net(net);
gtp = netdev_priv(dev);
/* Check if there's an existing gtpX device to configure */
dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK]));
- if (dev == NULL)
+ if (dev == NULL) {
+ put_net(net);
return -ENODEV;
+ }
+ put_net(net);
gtp = netdev_priv(dev);