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,7 +62,9 @@ int main(int argc, char **argv)
|
||||
printf("%s\n", dir->d_name);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
closedir(d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void printUsage(char *arg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user