diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-08-14 09:18:01 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-08-14 09:18:01 -0400 |
commit | 5c9db00e9e8b2361a57dfdc1ca2c0e3e9ee01efc (patch) | |
tree | ff6bb942542e7a127bcc6348fe34ed2700eb0b07 /src/nvim/os/provider.c | |
parent | 9fb0026fccf337a4c671bfa4f553c08da1e8722d (diff) | |
parent | 53231d5e0fb410dde098dc67e9a831638f744319 (diff) | |
download | rneovim-5c9db00e9e8b2361a57dfdc1ca2c0e3e9ee01efc.tar.gz rneovim-5c9db00e9e8b2361a57dfdc1ca2c0e3e9ee01efc.tar.bz2 rneovim-5c9db00e9e8b2361a57dfdc1ca2c0e3e9ee01efc.zip |
Merge pull request #1064 from mraghavan/coverity-22-07
coverity/71508: Fix potential null dereference.
Diffstat (limited to 'src/nvim/os/provider.c')
-rw-r--r-- | src/nvim/os/provider.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/os/provider.c b/src/nvim/os/provider.c index 99cc078e94..d94203f683 100644 --- a/src/nvim/os/provider.c +++ b/src/nvim/os/provider.c @@ -158,8 +158,10 @@ static uint64_t get_provider_for(char *method) err: // Ensure we won't try to restart the provider - f->bootstrap_command = NULL; - f->channel_id = 0; + if (f) { + f->bootstrap_command = NULL; + f->channel_id = 0; + } return 0; } |