mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
Remove spurious checks in evrpc.c error cases (coverity)
Coverity hates the case where you have a redundant NULL check after using something.
This commit is contained in:
parent
544cf8888a
commit
991b362001
3
evrpc.c
3
evrpc.c
@ -329,7 +329,6 @@ evrpc_request_cb(struct evhttp_request *req, void *arg)
|
||||
return;
|
||||
|
||||
error:
|
||||
if (rpc_state != NULL)
|
||||
evrpc_reqstate_free_(rpc_state);
|
||||
evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
|
||||
return;
|
||||
@ -372,7 +371,6 @@ evrpc_request_cb_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
|
||||
return;
|
||||
|
||||
error:
|
||||
if (rpc_state != NULL)
|
||||
evrpc_reqstate_free_(rpc_state);
|
||||
evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
|
||||
return;
|
||||
@ -454,7 +452,6 @@ evrpc_request_done(struct evrpc_req_generic *rpc_state)
|
||||
return;
|
||||
|
||||
error:
|
||||
if (rpc_state != NULL)
|
||||
evrpc_reqstate_free_(rpc_state);
|
||||
evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user