diff --git a/client/cmdscript.c b/client/cmdscript.c index 245ae61dc..f8306c041 100644 --- a/client/cmdscript.c +++ b/client/cmdscript.c @@ -121,6 +121,7 @@ static int CmdScriptRun(const char *Cmd) { int ret = PM3_EUNDEF; if (!str_endswith(preferredName, ".cmd")) ret = searchFile(&script_path, LUA_SCRIPTS_SUBDIR, preferredName, ".lua", false); if (!str_endswith(preferredName, ".lua")) ret = searchFile(&script_path, CMD_SCRIPTS_SUBDIR, preferredName, ".cmd", false); + free(script_path); return ret; }