changeset 19753:55511e55540d

lib-http: server: Error handling fix - avoid potential crash when request is already gone
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 11 Feb 2016 13:58:54 +0200
parents d9a6a40ecf15
children 2fb8d127acf4
files src/lib-http/http-server-request.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-http/http-server-request.c	Wed Feb 10 22:02:50 2016 +0200
+++ b/src/lib-http/http-server-request.c	Thu Feb 11 13:58:54 2016 +0200
@@ -408,7 +408,7 @@
 	if (req == NULL) {
 		/* request already gone (we shouldn't get here) */
 		stream->istream.stream_errno = EINVAL;
-		ret = -1;
+		return -1;
 	}
 
 	i_stream_seek(stream->parent, stream->parent_start_offset +