New API: inspect-get-icon returns the guest icon.
[libguestfs.git] / daemon / fsck.c
index 932f1c5..7a36440 100644 (file)
@@ -32,12 +32,13 @@ do_fsck (const char *fstype, const char *device)
   char *err;
   int r;
 
-  r = commandr (NULL, &err, "/sbin/fsck", "-a", "-t", fstype, device, NULL);
+  r = commandr (NULL, &err, "fsck", "-a", "-t", fstype, device, NULL);
   if (r == -1) {
     reply_with_error ("%s: %s", device, err);
     free (err);
     return -1;
   }
 
+  free (err);
   return r;
 }