From 09ea1b39d4110fcf5136f1355b45408fc5922d2d Mon Sep 17 00:00:00 2001 From: Morgan Aldridge Date: Sat, 30 Jan 2021 15:01:56 -0500 Subject: [PATCH] Duplicate command string in RestartSystem() as it'll get freed in Done() before it's used. Issue #10 --- mlvwm/functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlvwm/functions.c b/mlvwm/functions.c index ee44e33..deb1909 100644 --- a/mlvwm/functions.c +++ b/mlvwm/functions.c @@ -674,7 +674,7 @@ void RestartSystem( char *action ) top = SkipSpace( SkipNonSpace( action+6 )); if( strncmp( top, "mlvwm", 5 ) ) - Done( 1, top ); + Done( 1, strdup(top) ); else Done( 1, NULL ); }