Skip to content

Commit

Permalink
Fix panic for empty filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Rebhan committed Mar 11, 2024
1 parent 443ef42 commit 594ff9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/win_wmi/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (q *Query) extractProperties(acc telegraf.Accumulator, itemRaw *ole.VARIANT
value := propertyRaw.Value()
propertyRaw.Clear()

if q.tagFilter.Match(name) {
if q.tagFilter != nil && q.tagFilter.Match(name) {
s, err := internal.ToString(value)
if err != nil {
return fmt.Errorf("converting property %q failed: %w", s, err)
Expand Down

0 comments on commit 594ff9c

Please sign in to comment.