There is one more report that is false positive, see [1]:
"In bufferevent_openssl.c, pointer wm is dereferenced on line 871
before it is null checked on line 873."
[1]: https://github.com/libevent/libevent/issues/382#issuecomment-
238081938
* fix-uchex-warnings:
evdns: do not check server_req twice
evrpc: do not check req twice
Fixes: #382
(cherry picked from commit
da33f768e451f1b5722b7426e03c87e260ee43d0)
return 0;
err:
- if (server_req) {
- if (server_req->base.questions) {
- for (i = 0; i < server_req->base.nquestions; ++i)
- mm_free(server_req->base.questions[i]);
- mm_free(server_req->base.questions);
- }
- mm_free(server_req);
+ if (server_req->base.questions) {
+ for (i = 0; i < server_req->base.nquestions; ++i)
+ mm_free(server_req->base.questions[i]);
+ mm_free(server_req->base.questions);
}
+ mm_free(server_req);
return -1;
#undef SKIP_NAME
* layer is going to free it. we need to
* request ownership explicitly
*/
- if (req != NULL)
- evhttp_request_own(req);
+ evhttp_request_own(req);
evrpc_pause_request(pool, ctx,
evrpc_reply_done_closure);