mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
test: Fix a segfault in the test runner.
This commit is contained in:
parent
45e2aee8f9
commit
4686b8cea5
@ -600,11 +600,11 @@ struct IO : Sink {
|
||||
Observer &observer() { return *_observer; }
|
||||
|
||||
IO() {
|
||||
sinks.push_back( _observer = new Observer );
|
||||
clear();
|
||||
}
|
||||
|
||||
/* a stealing copy constructor */
|
||||
IO( const IO &io ) : sinks( io.sinks ), sources( io.sources )
|
||||
IO( const IO &io ) : sinks( io.sinks ), sources( io.sources ), _observer( io._observer )
|
||||
{
|
||||
io.sinks.clear();
|
||||
io.sources.clear();
|
||||
@ -619,6 +619,7 @@ struct IO : Sink {
|
||||
for ( Sinks::iterator i = sinks.begin(); i != sinks.end(); ++i )
|
||||
delete *i;
|
||||
sinks.clear();
|
||||
sinks.push_back( _observer = new Observer );
|
||||
}
|
||||
|
||||
~IO() { close(); clear(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user