mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
fix: get_cmdpath will sometimes leak memory
This commit is contained in:
parent
a7b78272ab
commit
a5a93be3d0
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ static char *deal_with_filled_path(char *filename, char **path,
|
||||||
if (tmp)
|
if (tmp)
|
||||||
return (filepath);
|
return (filepath);
|
||||||
else if (!tmp && ft_errno_get() == FT_STATFAIL)
|
else if (!tmp && ft_errno_get() == FT_STATFAIL)
|
||||||
return (NULL);
|
return (free(filepath), NULL);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
path_split_destroy(path);
|
path_split_destroy(path);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue