diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-01 17:04:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-01 17:04:56 +0200 |
commit | 1483800cdff3bd00faabe66436a1618f567f6754 (patch) | |
tree | 0a86f14f693ce14bd372c6a3421fb15f094983bb | |
parent | cc29827bc2b33d728768f09664d08c86404af105 (diff) | |
download | rneovim-1483800cdff3bd00faabe66436a1618f567f6754.tar.gz rneovim-1483800cdff3bd00faabe66436a1618f567f6754.tar.bz2 rneovim-1483800cdff3bd00faabe66436a1618f567f6754.zip |
coverity/161682: FP: Dereference after null check (#6630)
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 911f2a6fa4..cd64e14976 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -442,8 +442,7 @@ static void handle_request(Channel *channel, msgpack_object *request) evdata->request_id = request_id; incref(channel); if (handler.async) { - bool is_get_mode = sizeof("nvim_get_mode") - 1 == method->via.bin.size - && !strncmp("nvim_get_mode", method->via.bin.ptr, method->via.bin.size); + bool is_get_mode = handler.fn == handle_nvim_get_mode; if (is_get_mode && !input_blocking()) { // Defer the event to a special queue used by os/input.c. #6247 |