diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-16 00:42:29 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-16 01:16:11 +0100 |
commit | 193e7f5973e8a0ff7a4f8ebc542fcb9853a30d0d (patch) | |
tree | 9b9006e11a22451c113c2bc0761fbd36294ef382 | |
parent | 96d73dc6ea3016a80b5041ee0252e8473481b91e (diff) | |
download | lvm2-193e7f5973e8a0ff7a4f8ebc542fcb9853a30d0d.tar.gz |
config: check vdef pointer before dereference
Coverity notices we check for v_def != NULL elsewhere, so it thinks
it may be possibly NULL also here.
-rw-r--r-- | lib/config/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/config/config.c b/lib/config/config.c index 1298b40cb..d69f1f750 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -891,7 +891,7 @@ static int _check_value_differs_from_default(struct cft_check_handle *handle, } break; case DM_CFG_EMPTY_ARRAY: - diff = v_def->type != DM_CFG_EMPTY_ARRAY; + diff = (v_def && (v_def->type != DM_CFG_EMPTY_ARRAY)); break; default: log_error(INTERNAL_ERROR "inconsistent state reached in _check_value_differs_from_default"); |