mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +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; }
|
Observer &observer() { return *_observer; }
|
||||||
|
|
||||||
IO() {
|
IO() {
|
||||||
sinks.push_back( _observer = new Observer );
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a stealing copy constructor */
|
/* 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.sinks.clear();
|
||||||
io.sources.clear();
|
io.sources.clear();
|
||||||
@ -619,6 +619,7 @@ struct IO : Sink {
|
|||||||
for ( Sinks::iterator i = sinks.begin(); i != sinks.end(); ++i )
|
for ( Sinks::iterator i = sinks.begin(); i != sinks.end(); ++i )
|
||||||
delete *i;
|
delete *i;
|
||||||
sinks.clear();
|
sinks.clear();
|
||||||
|
sinks.push_back( _observer = new Observer );
|
||||||
}
|
}
|
||||||
|
|
||||||
~IO() { close(); clear(); }
|
~IO() { close(); clear(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user