On Sun, May 8, 2016 at 3:55 PM, Pablo Neira Ayuso <pa...@netfilter.org> wrote:
> +static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info)
> +{
...
> +
> +       net = gtp_genl_get_net(sock_net(skb->sk), info->attrs);
> +       if (IS_ERR(net))
> +               return PTR_ERR(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)
> +               return -ENODEV;
> +
> +       return ipv4_pdp_add(dev, info);


Seems you are leaking struct net at least in the error path.

Reply via email to