diff --git a/src/smart.c b/src/smart.c
index f0c189e9e01422de492dc9de9468968df47f3882..2207bd6722449f4de11c3b89a976817ba8702558 100644 (file)
--- a/src/smart.c
+++ b/src/smart.c
@@ -109,7 +109,7 @@ static void smart_handle_disk_attribute(SkDisk *d, const SkSmartAttributeParsedD
plugin_dispatch_values (&vl);
- if (a->threshold_valid && a->current_value < a->threshold)
+ if (a->threshold_valid && a->current_value <= a->threshold)
{
notification_t notif = { NOTIF_WARNING,
cdtime (),
/* Query status with libatasmart */
smart_handle_disk (devpath);
+ udev_device_unref (dev);
}
udev_enumerate_unref (enumerate);