The dirp should be initialized here

This commit is contained in:
lostd 2014-10-10 13:24:19 +03:00
parent f05f98e4fe
commit 11bebdf23e

View file

@ -555,11 +555,10 @@ out:
free(dents[i].name); free(dents[i].name);
free(dents); free(dents);
if (dirp != NULL) { /* Should never be null */
r = closedir(dirp); r = closedir(dirp);
if (r == -1) if (r == -1)
printerr(1, "closedir"); printerr(1, "closedir");
}
goto begin; goto begin;
} }