Browse Source

[fix] free 'p' after var usage.

Moul 2 years ago
parent
commit
7f4e84e72e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/pipe_exec.c

+ 1 - 1
src/pipe_exec.c

@@ -27,10 +27,10 @@ void	launch_pipes(t_e *e, t_pipe *p, t_pr **t)
 	free(p->cmd_pipe);
 	p->cmd_opt[p->i] = NULL;
 	free(p->fd);
-	free(p);
 	p->i = -1;
 	while (++p->i <= p->nbr)
 		wait(NULL);
+	free(p);
 }
 
 /*