The functions have to check for NULL pointer.
Signed-off-by: Karel Zak <kzak@redhat.com>
int ret;
devlabel = fsprobe_get_label_by_devname(device);
+ if (!devlabel)
+ return 0;
+
ret = !strcmp(label, devlabel);
- /* free(devlabel); */
+ my_free(devlabel);
return ret;
}
int ret;
devuuid = fsprobe_get_uuid_by_devname(device);
+ if (!devuuid)
+ return 0;
+
ret = !strcmp(uuid, devuuid);
- /* free(devuuid); */
+ my_free(devuuid);
return ret;
}