Dolda2000 GitWeb
/
statserve.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea4e0b7
)
Fixed FD leak in fssrc.
author
Fredrik Tolf
<fredrik@seatribe.se>
Tue, 14 Jun 2011 19:25:27 +0000
(21:25 +0200)
committer
Fredrik Tolf
<fredrik@seatribe.se>
Tue, 14 Jun 2011 19:25:27 +0000
(21:25 +0200)
fssrc.c
patch
|
blob
|
blame
|
history
diff --git
a/fssrc.c
b/fssrc.c
index
8a34ddb
..
c69da66
100644
(file)
--- a/
fssrc.c
+++ b/
fssrc.c
@@
-49,12
+49,14
@@
static struct fileinfo fsserve(struct source *src, char *nm)
flog(LOG_ERR, "fssrc: %s: %s", p, strerror(errno));
free(p);
buffree(rb);
+ close(fd);
return((struct fileinfo){});
}
if(ret == 0)
break;
rb.d += ret;
}
+ close(fd);
return((struct fileinfo){.mtime = sb.st_mtime, .sz = rb.d, .data = rb.b, .ctype = "image/png"});
}