Code

Update smart.c
authorFlorian Schüller <schuellerf@users.noreply.github.com>
Wed, 10 Jun 2015 13:29:31 +0000 (15:29 +0200)
committerFlorian Schüller <schuellerf@users.noreply.github.com>
Wed, 10 Jun 2015 13:29:31 +0000 (15:29 +0200)
Are you sure this doesn't memory-leak?
(I didn't have time to run valgrind but is it possible that this command is missing?)

src/smart.c

index 3b113bd33a2d45978622fc0512efe3e11f7eec38..a9c563eab96ada1ee46031617370f946f1a264e9 100644 (file)
@@ -253,6 +253,7 @@ static int smart_read (void)
 
     /* Query status with libatasmart */
     smart_handle_disk (devpath);
+    udev_device_unref(dev);
   }
 
   udev_enumerate_unref (enumerate);