fix crash when finding init script
This commit is contained in:
@@ -375,7 +375,10 @@ static char *get_script_path (void)
|
|||||||
for (size_t i = 0; i < (sizeof(paths) / sizeof(paths[0])); i++)
|
for (size_t i = 0; i < (sizeof(paths) / sizeof(paths[0])); i++)
|
||||||
{
|
{
|
||||||
if ( path != NULL )
|
if ( path != NULL )
|
||||||
|
{
|
||||||
free(path);
|
free(path);
|
||||||
|
path = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Path needs env var, but it is not set. */
|
/* Path needs env var, but it is not set. */
|
||||||
if ( paths[i].needs_env && paths[i].env == NULL )
|
if ( paths[i].needs_env && paths[i].env == NULL )
|
||||||
|
|||||||
Reference in New Issue
Block a user