`ls`: fix memory leak in specified paths

master
Drake 3 years ago
parent 998a92840f
commit 2e91a4cab5
No known key found for this signature in database
GPG Key ID: 9B83455BD94F12A3

@ -84,7 +84,9 @@ int main(int argc, char** argv) {
getcwd(wd, sizeof(wd));
} else if (specpath == true) {
//printf("f\n");
strcpy(wd, realpath(thatpath, NULL));
char *e = realpath(thatpath, NULL);
strcpy(wd, e);
free(e);
}
//printf(wd);
DIR* dirp;

Loading…
Cancel
Save