bugfix: avoid nil reference when ignore is nil (#1414)
Signed-off-by: detailyang <detailyang@gmail.com>pull/1423/head
parent
f693a71c06
commit
7fe9713edf
|
@ -42,7 +42,7 @@ func getNetDevStats(ignore *regexp.Regexp, accept *regexp.Regexp) (map[string]ma
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if ignore.MatchString(iface.Name) {
|
if ignore != nil && ignore.MatchString(iface.Name) {
|
||||||
log.Debugf("Ignoring device: %s", iface.Name)
|
log.Debugf("Ignoring device: %s", iface.Name)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue