lkml.org 
[lkml]   [2017]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] netlink: do not proceed if dump's start() errs
On Wed, Sep 27, 2017 at 2:39 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> - if (cb->start)
> - cb->start(cb);
> + if (cb->start) {
> + ret = cb->start(cb);
> + if (ret)

I need to sock_put(sk); before returning. I'll fix this for v2, but
will for additional comments in case anybody has some.

> + return ret;
> + }
>
> ret = netlink_dump(sk);
> sock_put(sk);

\
 
 \ /
  Last update: 2017-09-27 14:51    [W:0.064 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site