]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: server: Made sure destroy callback is called only once.
authorStephan Bosch <stephan@rename-it.nl>
Wed, 10 Sep 2014 10:39:37 +0000 (13:39 +0300)
committerStephan Bosch <stephan@rename-it.nl>
Wed, 10 Sep 2014 10:39:37 +0000 (13:39 +0300)
src/lib-http/http-server-request.c

index 7367bb8bcc6d6dd5de79f55a210171c3aa96963c..8862f579ae71a1ec34dd1b64a86318207c57d405 100644 (file)
@@ -59,8 +59,10 @@ void http_server_request_destroy(struct http_server_request **_req)
        if (req->delay_destroy) {
                req->destroy_pending = TRUE;
        } else if (req->destroy_callback != NULL) {
-               req->destroy_callback(req->destroy_context);
+               void (*callback)(void *) = req->destroy_callback;
+
                req->destroy_callback = NULL;
+               callback(req->destroy_context);
        }
        http_server_request_unref(_req);
 }