@cryptotaxi247 / netdata-1 / commits / 26e3f376b

do not attempt to create disk charts for disks without a name; fixes #2967

Costa Tsaousis (ktsaou) committed Nov 9, 2017 at 19:28 UTC 26e3f376b98a71e658fc4fe5811502fbc02dcff6
1 file changed +6
src/macos_fw.c
+6
@@ -112,8 +112,14 @@ int do_macos_iokit(int update_every, usec_t dt) {
112 CFRelease(properties);
113 IOObjectRelease(drive_media);
114
115 + if(unlikely(!diskstat.name || !*diskstat.name)) {
116 + IOObjectRelease(drive);
117 + continue;
118 + }
119 +
120 /* Obtain the properties for this drive object. */
121 if (unlikely(IORegistryEntryCreateCFProperties(drive, (CFMutableDictionaryRef *)&properties, kCFAllocatorDefault, 0))) {
122 + IOObjectRelease(drive);
123 error("MACOS: IORegistryEntryCreateCFProperties() failed");
124 do_io = 0;
125 error("DISABLED: system.io");