• E
    fdstream: avoid double close bug · f3cfc7c8
    Eric Blake 提交于
    Wen Congyang reported that we have a double-close bug if we fail
    virFDStreamOpenInternal, since childfd duplicated one of the fds[]
    array contents.  In truth, since we always transfer both members
    of fds to other variables, we should close the fds through those
    other names, and just use fds[] for pipe().
    
    Bug present since 0.9.0 (commit e886237a).
    
    * src/fdstream.c (virFDStreamOpenFileInternal): Swap scope of
    childfd and fds[], to avoid a double close.
    f3cfc7c8
fdstream.c 19.2 KB