From 53231d5e0fb410dde098dc67e9a831638f744319 Mon Sep 17 00:00:00 2001 From: Manish Raghavan Date: Wed, 13 Aug 2014 20:16:14 -0700 Subject: coverity/71508: Fix potential null dereference. Make sure feature pointer is not null before dereferencing. --- src/nvim/os/provider.c | 6 ++++-- 1 file 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; } -- cgit