diff --git a/libfprint/drivers/crfpmoc/crfpmoc.c b/libfprint/drivers/crfpmoc/crfpmoc.c index 59498a01..29579900 100644 --- a/libfprint/drivers/crfpmoc/crfpmoc.c +++ b/libfprint/drivers/crfpmoc/crfpmoc.c @@ -157,10 +157,12 @@ crfpmoc_ec_command (FpiDeviceCrfpMoc *self, int command, int version, const void r = -CRFPMOC_EECRESULT - s_cmd->result; } } - g_free (s_cmd); if (error_msg != NULL) *error_msg = crfpmoc_strresult (s_cmd->result); + + g_free (s_cmd); + return r; } @@ -249,7 +251,7 @@ static int crfpmoc_cmd_wait_event_fingerprint (FpiDeviceCrfpMoc *self) { int rv; - struct crfpmoc_ec_response_get_next_event_v1 buffer; + struct crfpmoc_ec_response_get_next_event_v1 buffer = { 0 }; long timeout = 5000; long event_type = CRFPMOC_EC_MKBP_EVENT_FINGERPRINT; diff --git a/libfprint/fp-device.c b/libfprint/fp-device.c index 4343349e..0c166469 100644 --- a/libfprint/fp-device.c +++ b/libfprint/fp-device.c @@ -307,7 +307,7 @@ fp_device_get_property (GObject *object, case PROP_FPI_UDEV_DATA_MISC: if (cls->type == FP_DEVICE_TYPE_UDEV) - g_value_set_string (value, g_strdup (priv->udev_data.misc_path)); + g_value_set_string (value, priv->udev_data.misc_path); else g_value_set_string (value, NULL); break;