diff --git a/src/modules/systemd/libzbxsystemd.c b/src/modules/systemd/libzbxsystemd.c index c24a034..dc72fed 100644 --- a/src/modules/systemd/libzbxsystemd.c +++ b/src/modules/systemd/libzbxsystemd.c @@ -211,8 +211,8 @@ static int SYSTEMD_UNIT_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result) switch (i) { case 0: // filter by unit type - if(NULL != filter || '\0' != filter) - if(0 == systemd_cmptype(value.str, filter)) + if(NULL != filter && '\0' != *filter) + if (0 == systemd_cmptype(value.str, filter)) goto next_unit; zbx_json_addobject(&j, NULL);