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




src/tests/cluster.cpp (lines 364 - 366)
<https://reviews.apache.org/r/45689/#comment190367>

    The destructor will only dereference a null `containerizer` if this error 
case is hit (or if you pass in a `nullptr` cast to `slave::Containerizer*`).
    
    At this point in the code, we haven't done anything other than create some 
objects.  So it should be ok to do something like this in the destructor:
    ```
    if (containerizer == nullptr) {
      return;
    }
    ```
    The call to `terminate()` only matters if the `cluster::Slave` is created 
successfully.


- Joseph Wu


On April 4, 2016, 10:31 a.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45689/
> -----------------------------------------------------------
> 
> (Updated April 4, 2016, 10:31 a.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere, Joseph Wu, and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If Cluster::Slave::start() fails, make sure we don't crash in the
> destructor.
> 
> 
> Diffs
> -----
> 
>   src/tests/cluster.cpp 14d0d34fcb4c408ad996672394c39c84fd2be918 
> 
> Diff: https://reviews.apache.org/r/45689/diff/
> 
> 
> Testing
> -------
> 
> Make check.
> 
> 
> Thanks,
> 
> James Peach
> 
>

Reply via email to