diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2013-05-23 13:03:53 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2013-05-23 13:03:53 +0000 |
commit | aaa8929d94ab34ecac244fdcb503a8f8478b9378 (patch) | |
tree | 545538c13e641ec2f3bdb3f80f49ff98e7673ec5 /usr.sbin | |
parent | 5c9143adc59223e582d146832e18cd49a5b0c0ab (diff) |
Fix pasto where 'c' instead of 'clients' is checked for NULL and add missing
free for the fcgi_response.
ok florian@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/slowcgi/slowcgi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/slowcgi/slowcgi.c b/usr.sbin/slowcgi/slowcgi.c index 2bdc72ba185..029f64a78f2 100644 --- a/usr.sbin/slowcgi/slowcgi.c +++ b/usr.sbin/slowcgi/slowcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slowcgi.c,v 1.1 2013/05/23 12:03:24 florian Exp $ */ +/* $OpenBSD: slowcgi.c,v 1.2 2013/05/23 13:03:52 jasper Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> * Copyright (c) 2013 Florian Obser <florian@openbsd.org> @@ -376,7 +376,7 @@ slowcgi_accept(int fd, short events, void *arg) return; } clients = calloc(1, sizeof(*clients)); - if (c == NULL) { + if (clients == NULL) { lwarn("cannot calloc clients"); close(s); free(c); @@ -815,6 +815,7 @@ script_in(int fd, struct event *ev, struct client *c, uint8_t type) switch (errno) { case EINTR: case EAGAIN: + free(resp); return; default: n = 0; /* fake empty FCGI_STD{OUT,ERR} response */ |