diff --git a/hsflowd.spec b/hsflowd.spec index de1dfedd..08684cb0 100644 --- a/hsflowd.spec +++ b/hsflowd.spec @@ -1,7 +1,7 @@ Summary: host sFlow daemon Name: hsflowd Version: 2.0.26 -Release: 4 +Release: 5 License: http://sflow.net/license.html Group: Applications/Internet URL: http://sflow.net diff --git a/src/Linux/mod_sonic.c b/src/Linux/mod_sonic.c index 2899536b..f0776eff 100644 --- a/src/Linux/mod_sonic.c +++ b/src/Linux/mod_sonic.c @@ -1054,9 +1054,11 @@ extern "C" { char *pcmem = parseNextTok(&p, "|", YES, 0, NO, buf, HSP_SONIC_MAX_COLLECTORNAME_LEN); if(my_strequal(pcmem, "SFLOW_COLLECTOR")) { char *collectorName = parseNextTok(&p, "|", YES, 0, NO, buf, HSP_SONIC_MAX_COLLECTORNAME_LEN); - HSPSonicCollector *coll = getCollector(mod, collectorName, YES); - coll->mark = NO; - UTArrayPush(mdata->newCollectors, coll); + if(collectorName) { + HSPSonicCollector *coll = getCollector(mod, collectorName, YES); + coll->mark = NO; + UTArrayPush(mdata->newCollectors, coll); + } } } }