mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 19:36:50 +01:00
「🔨」 fix: get_pwd fixed leak
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/02 14:42:00 by adjoly #+# #+# */
|
/* Created: 2024/05/02 14:42:00 by adjoly #+# #+# */
|
||||||
/* Updated: 2024/05/17 14:25:28 by adjoly ### ########.fr */
|
/* Updated: 2024/05/27 12:52:07 by adjoly ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -30,6 +30,7 @@ char *get_pwd(void)
|
|||||||
pwd = ft_strjoin("~", pwd);
|
pwd = ft_strjoin("~", pwd);
|
||||||
if (!pwd)
|
if (!pwd)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
return (pwd);
|
||||||
}
|
}
|
||||||
return (ft_strdup(pwd));
|
return (ft_strdup(pwd));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user