Update simple-ls-ver2.c
Valgrind shows a memory leak related to the function call d = opendir(path) on line 50. Very much appreciate the book, btw. Helping me learn and get comfortable with C!
This commit is contained in:
parent
7289f21b8d
commit
80edfd53ac
@ -62,6 +62,8 @@ int main(int argc, char **argv)
|
|||||||
printf("%s\n", dir->d_name);
|
printf("%s\n", dir->d_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closedir(d);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user