42-archive/42sh/src/exec/pfree_cmd.c
2017-03-13 22:39:12 +01:00

22 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pfree_cmd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/08 00:58:02 by wescande #+# #+# */
/* Updated: 2017/03/13 22:31:32 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int pfree_cmd(t_process *p)
{
ft_strdel(&p->data.cmd.path);
ft_sstrfree(p->data.cmd.av);
p->data.cmd.execf = NULL;
ft_memdel((void**)&p->data.cmd.stat);
return (0);
}