From: Josef 'Jeff' Sipek Date: Fri, 25 May 2018 23:11:35 +0000 (-0400) Subject: lib-http: http_client_request_abort(NULL) should be a no-op X-Git-Tag: 2.3.9~1780 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4088fc7b3e6b9c98a8d8e99ccfeac9d5c7e50ec3;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http_client_request_abort(NULL) should be a no-op --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index 8ba2f5df45..13d6a9565b 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -1481,7 +1481,12 @@ void http_client_request_error(struct http_client_request **_req, void http_client_request_abort(struct http_client_request **_req) { struct http_client_request *req = *_req; - bool sending = (req->state == HTTP_REQUEST_STATE_PAYLOAD_OUT); + bool sending; + + if (req == NULL) + return; + + sending = (req->state == HTTP_REQUEST_STATE_PAYLOAD_OUT); *_req = NULL;