-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53457/#review155680
-----------------------------------------------------------


Fix it, then Ship it!




Modulo the leak path described below:


3rdparty/libprocess/src/poll_socket.cpp (lines 104 - 110)
<https://reviews.apache.org/r/53457/#comment225742>

    This introduces a leakable path for the 's' file descriptor: if create 
fails, 's' is not closed.
    It turns out that create cannot fail currently, but of course we don't want 
to rely on this :)
    
    Seems we could either continue to have accept return a Socket::Impl to 
avoid the caller here having to think about closing, or we can perform an 
os::close if create fails.


- Benjamin Mahler


On Nov. 4, 2016, 6:40 a.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53457/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 6:40 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated Socket::Impl::accept to return std::shared_ptr<Impl>.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/socket.hpp 
> f798af7879546d71e8ef4a295c9cf489a70cb61f 
>   3rdparty/libprocess/src/poll_socket.hpp 
> d04f3f2d1bcf70464ac659b29f96574bbd233414 
>   3rdparty/libprocess/src/poll_socket.cpp 
> f0ee1490e6fccb038f64a27b2c71458ad5b5e5a1 
> 
> Diff: https://reviews.apache.org/r/53457/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>

Reply via email to