chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5de3f4
)
uslip: Don't let gobblers leak file descriptors.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 20 Dec 2008 11:39:32 +0000
(11:39 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 20 Dec 2008 11:39:32 +0000
(11:39 +0000)
The otherwise aptly-named gobbler_close function neglected to actually
close its file descriptor.
uslip/uslip.c
patch
|
blob
|
blame
|
history
diff --git
a/uslip/uslip.c
b/uslip/uslip.c
index eb60eb691d861bca510b2aff29e36291f8f6dfce..245f1ec0e22e6afa611608d758c5b7423d41a543 100644
(file)
--- a/
uslip/uslip.c
+++ b/
uslip/uslip.c
@@
-193,7
+193,7
@@
static void destroy_pkq(pkq *q)
*/
static void gobbler_close(gobbler *g)
- { if (g->f.fd != -1) { sel_rmfile(&g->f); g->f.fd = -1; } }
+ { if (g->f.fd != -1) { sel_rmfile(&g->f);
close(g->f.fd);
g->f.fd = -1; } }
static void gobbler_destroy(gobbler *g) { gobbler_close(g); DESTROY(g); }