lkml.org 
[lkml]   [2016]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: ip, diag -- Add diag interface for raw sockets
On Fri, Sep 09, 2016 at 12:55:13PM -0700, Eric Dumazet wrote:
> > +
> > + rep = nlmsg_new(sizeof(struct inet_diag_msg) +
> > + sizeof(struct inet_diag_meminfo) + 64,
> > + GFP_KERNEL);
> > + if (!rep)
>
> There is a missing sock_put(sk)
>
> > + return -ENOMEM;
> > +
> > + err = inet_sk_diag_fill(sk, NULL, rep, r,
> > + sk_user_ns(NETLINK_CB(in_skb).sk),
> > + NETLINK_CB(in_skb).portid,
> > + nlh->nlmsg_seq, 0, nlh);
>
> sock_put(sk);

Oh, missed. Thanks lot, Eric, will update!

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.079 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site