in_thermal: validate file handle before to close it
@@ -123,9 +123,12 @@ static inline int proc_temperature(struct flb_in_thermal_config *ctx, struct tem
++i;
}
}
+
+ if (f) {
fclose(f);
}
}
+ }
closedir(d);
return i;
}
