remove leak; dashdash bug fix
This commit is contained in:
parent
9e57c380fd
commit
7c660d5f7b
|
@ -52,13 +52,14 @@ parsing(char **argv, t_list ***files, t_list ***dirs, i32 *max_size, i32 *len, i
|
||||||
static void*
|
static void*
|
||||||
free_dir_return_null(dir_t *dir) {
|
free_dir_return_null(dir_t *dir) {
|
||||||
free(dir->path);
|
free(dir->path);
|
||||||
|
free(dir->name);
|
||||||
free(dir);
|
free(dir);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dir_t *
|
dir_t *
|
||||||
get_directory_files(char *path) {
|
get_directory_files(char *path) {
|
||||||
if (path[0] == '-' && ft_strlen(path) != 1)
|
if (!flags.dashdash && path[0] == '-' && ft_strlen(path) != 1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dir_t *dir = ft_calloc(1, sizeof(dir_t));
|
dir_t *dir = ft_calloc(1, sizeof(dir_t));
|
||||||
|
|
Loading…
Reference in a new issue