if (sscanf (out, "%" SCNi64, &rv) != 1) {
reply_with_error ("%s: expected output, but got nothing", argv[0]);
free (out);
+ free (err);
return -1;
}
}
free (out);
+ free (err);
return rv;
}
if (r == -1) {
/* Test failed, eg. missing or completely unusable parted binary. */
reply_with_error ("could not run 'parted' command");
+ free (err);
return -1;
}
if (err && strstr (err, "invalid option -- m"))
- return result = 0;
-
- return result = 1;
+ result = 0;
+ else
+ result = 1;
+ free (err);
+ return result;
}
static char *