This website works better with JavaScript.
Home
Explore
Help
Sign In
Immanuel
/
nnn
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Only closedir when dirp is valid
master
sin
10 years ago
parent
bc2d9e7c11
commit
61cd0f8041
1 changed files
with
5 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-3
noice.c
+ 5
- 3
noice.c
View File
@@ -552,9 +552,11 @@ out:
free(dents[i].name);
free(dents);
r = closedir(dirp);
if (r == -1)
printerr(1, "closedir");
if (dirp != NULL) {
r = closedir(dirp);
if (r == -1)
printerr(1, "closedir");
}
goto begin;
}
Write
Preview
Loading…
Cancel
Save