Skip to content
Snippets Groups Projects
Commit 1123bf6d authored by Rajmund Hruška's avatar Rajmund Hruška Committed by Tomáš Pecka
Browse files

algo: covers: Fix memory leaks of approximate enhanced covers computation

parent 0f92d103
No related branches found
No related tags found
1 merge request!148Bp hruskaraj rebase
......@@ -42,8 +42,10 @@ ext::set < string::LinearString < SymbolType > > ApproximateEnhancedCoversComput
for ( size_t i = 2; i < x.getContent ( ).size ( ); ++i ) {
nextState = constrNextState ( x, previousState, k );
 
if ( nextState->elements.size ( ) < 2 )
if ( nextState->elements.size ( ) < 2 ) {
delete nextState;
break;
}
 
delete previousState;
Element lastElement = nextState->elements[nextState->elements.size ( ) - 1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment