diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-01-08 12:04:06 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-01-08 12:04:06 -0500 |
commit | 991b362001b0d31cc175d78c24a6de2d7137c56a (patch) | |
tree | 1ef9911b074e9b429e0f9d33f515aefd8b37cca4 /evrpc.c | |
parent | 544cf8888ae95f29112fa8fb024b630c3134948a (diff) | |
download | libevent-991b362001b0d31cc175d78c24a6de2d7137c56a.tar.gz |
Remove spurious checks in evrpc.c error cases (coverity)
Coverity hates the case where you have a redundant NULL check after
using something.
Diffstat (limited to 'evrpc.c')
-rw-r--r-- | evrpc.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -329,8 +329,7 @@ evrpc_request_cb(struct evhttp_request *req, void *arg) return; error: - if (rpc_state != NULL) - evrpc_reqstate_free_(rpc_state); + evrpc_reqstate_free_(rpc_state); evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL); return; } @@ -372,8 +371,7 @@ evrpc_request_cb_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res) return; error: - if (rpc_state != NULL) - evrpc_reqstate_free_(rpc_state); + evrpc_reqstate_free_(rpc_state); evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL); return; } @@ -454,8 +452,7 @@ evrpc_request_done(struct evrpc_req_generic *rpc_state) return; error: - if (rpc_state != NULL) - evrpc_reqstate_free_(rpc_state); + evrpc_reqstate_free_(rpc_state); evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL); return; } |