[libft] ft_lstadd_front memory leak
iijung opened this issue · 2 comments
iijung commented
sample
t_list *old; // 1 > 2 > 3
t_list *new; // a > b > c
as-is
ft_lstadd_front(old, new); // a > 1 > 2 > 3 (b, c memory leak)
to-be
ft_lstadd_front(old, new); // a > b > c > 1 > 2 > 3 (no memory leak)
xicodomingues commented
Answered in the pull request.