Skip to content

Commit

Permalink
lib-http: client: Assert that req->client != NULL in http_client_requ…
Browse files Browse the repository at this point in the history
…est_send_error().

Applies when blocking payload output API is being used.
Addresses a report by scan-build.
  • Loading branch information
stephanbosch authored and villesavolainen committed Mar 13, 2018
1 parent 1ab6917 commit a61c327
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib-http/http-client-request.c
Expand Up @@ -1412,8 +1412,10 @@ http_client_request_send_error(struct http_client_request *req,
i_stream_unref(&req->payload_input);
}
}
if (req->payload_wait)
if (req->payload_wait) {
i_assert(req->client != NULL);
io_loop_stop(req->client->ioloop);
}
return TRUE;
}

Expand Down

0 comments on commit a61c327

Please sign in to comment.