Duplicate command string in RestartSystem() as it'll get freed in Done() before it's used. Issue #10

This commit is contained in:
Morgan Aldridge 2021-01-30 15:01:56 -05:00
parent e65b6ff507
commit 09ea1b39d4

View File

@ -674,7 +674,7 @@ void RestartSystem( char *action )
top = SkipSpace( SkipNonSpace( action+6 )); top = SkipSpace( SkipNonSpace( action+6 ));
if( strncmp( top, "mlvwm", 5 ) ) if( strncmp( top, "mlvwm", 5 ) )
Done( 1, top ); Done( 1, strdup(top) );
else else
Done( 1, NULL ); Done( 1, NULL );
} }