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:
warrenlc 2023-03-25 15:04:41 +01:00 committed by GitHub
parent 7289f21b8d
commit 80edfd53ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)