From 27cdc98ad884eba8581571d90e94770ee4de597b Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 23 Apr 2016 11:57:25 +0200 Subject: [PATCH] plugin.c: fix potential null pointer dereference [src/daemon/plugin.c:2095] -> [src/daemon/plugin.c:2091]: (warning) Either the condition 'vl==0' is redundant or there is possible null pointer dereference: vl. --- src/daemon/plugin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index 7e905f97..fa78fa02 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -2088,8 +2088,10 @@ static int plugin_dispatch_values_internal (value_list_t *vl) int free_meta_data = 0; - if ((vl == NULL) || (vl->type[0] == 0) - || (vl->values == NULL) || (vl->values_len < 1)) + assert(vl); + assert(vl->plugin); + + if (vl->type[0] == 0 || vl->values == NULL || vl->values_len < 1) { ERROR ("plugin_dispatch_values: Invalid value list " "from plugin %s.", vl->plugin); -- 2.30.2