Skip to content

Commit

Permalink
lib-http: http_client_request_abort(NULL) should be a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef 'Jeff' Sipek authored and cmouse committed Jun 13, 2018
1 parent 3468508 commit 6332c59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib-http/http-client-request.c
Expand Up @@ -1477,7 +1477,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;

Expand Down

0 comments on commit 6332c59

Please sign in to comment.