fix: add: free, remove leak

This commit is contained in:
starnakin 2023-07-01 11:48:49 +02:00
parent e946b215cf
commit 4dfa13221c
2 changed files with 3 additions and 0 deletions

View File

@ -6,4 +6,5 @@ void cmd_del(void *ptr)
tab_free((void**)content->args);
free(content->executable);
free(content);
}

View File

@ -46,6 +46,7 @@ lst **parsing_pipe(const char *str, lst** env)
parsing_cmd(cmds_str[i], current->content, env);
current = current->next;
}
tab_free((void**)cmds_str);
return (cmds);
}
@ -73,6 +74,7 @@ lst*** parsing(const char *line, lst** env)
return (NULL);
}
}
tab_free((void **) line_commas);
tab[i] = NULL;
return (tab);
}