Address review comment, fix valgrind warnings

This commit is contained in:
Abhinav Baid 2024-06-17 20:08:04 +01:00 committed by Xelef2000
parent 995ab63943
commit 2af7fc4461
2 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -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;