On Thu, Feb 28, 2019 at 07:36:29AM -0800, Richard Cochran wrote:
> > +no_info:
> > + rtnl_close(fd);
> > + return len;
> > +}
>
> Here len is -1, as an error flag. Why simply propagate that error
> correct up the call stack?
>
> No need for rtnl_close() here.
The proper usage is:
rtnl_open()
rtnl_...
rtnl_close()
Calling rtnl_close() calls close(fd), and so your new call site is
buggy.
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel