]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: http-server-request - Don't destroy anything when request destroy is delayed.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 14 Mar 2020 11:21:15 +0000 (12:21 +0100)
committermartti.rannanjarvi <martti.rannanjarvi@open-xchange.com>
Sat, 18 Apr 2020 14:55:11 +0000 (14:55 +0000)
src/lib-http/http-server-request.c

index eddb4efd8ed3f5aa27017c24e166ee078be1fccb..a4b6fcd4c5062e8007065626afcfa5f73c3959a5 100644 (file)
@@ -135,7 +135,11 @@ void http_server_request_destroy(struct http_server_request **_req)
 
        if (req->delay_destroy) {
                req->destroy_pending = TRUE;
-       } else if (req->destroy_callback != NULL) {
+               http_server_request_unref(_req);
+               return;
+       }
+
+       if (req->destroy_callback != NULL) {
                void (*callback)(void *) = req->destroy_callback;
 
                req->destroy_callback = NULL;