From be24fca042412cae345a9faba1b7c5cd4702e9c1 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Mon, 25 Feb 2013 16:23:13 +0200 Subject: [PATCH] http: fix crash after redirect Make sure to set do_close to NULL after calling http_conn_close(). Reported for EWS autodiscovery redirect, but in my opinion it was broken for *every* HTTP redirect. I guess HTTP redirects aren't used in the OCS world or users never bothered to report the crash... --- src/core/http-conn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/http-conn.c b/src/core/http-conn.c index f3711edb..ae05d837 100644 --- a/src/core/http-conn.c +++ b/src/core/http-conn.c @@ -715,8 +715,10 @@ static void http_conn_input(struct sipe_transport_connection *conn) if (http_conn->closed) { http_conn_close(http_conn->do_close, "Server closed connection"); + http_conn->do_close = NULL; } else if (http_conn->do_close) { http_conn_close(http_conn->do_close, "User initiated"); + http_conn->do_close = NULL; } } -- 2.11.4.GIT