diff options
author | Manish Raghavan <manishraghavan@gmail.com> | 2014-08-13 20:16:14 -0700 |
---|---|---|
committer | Manish Raghavan <manishraghavan@gmail.com> | 2014-08-13 20:16:14 -0700 |
commit | 53231d5e0fb410dde098dc67e9a831638f744319 (patch) | |
tree | 13f5883dfaedfd31b05b3e7924c7ffe487db2d0f | |
parent | fde390133e4cd176a693b1d01c013e03e4606e8a (diff) | |
download | rneovim-53231d5e0fb410dde098dc67e9a831638f744319.tar.gz rneovim-53231d5e0fb410dde098dc67e9a831638f744319.tar.bz2 rneovim-53231d5e0fb410dde098dc67e9a831638f744319.zip |
coverity/71508: Fix potential null dereference.
Make sure feature pointer is not null before dereferencing.
-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; } |