fix crash when finding init script

This commit is contained in:
Leon Henrik Plickat
2023-12-29 08:16:20 +01:00
parent aab2f4ef17
commit 0bbe968afe

View File

@@ -375,7 +375,10 @@ static char *get_script_path (void)
for (size_t i = 0; i < (sizeof(paths) / sizeof(paths[0])); i++)
{
if ( path != NULL )
{
free(path);
path = NULL;
}
/* Path needs env var, but it is not set. */
if ( paths[i].needs_env && paths[i].env == NULL )