device: Clear username on open failure

This commit is contained in:
Marco Trevisan (Treviño)
2020-01-29 21:02:12 +01:00
committed by Bastien Nocera
parent 791a208afd
commit 46b7d7c1a7

View File

@ -602,6 +602,7 @@ static void dev_open_cb(FpDevice *dev, GAsyncResult *res, void *user_data)
FPRINT_ERROR_INTERNAL, FPRINT_ERROR_INTERNAL,
"Open failed with error: %s", error->message); "Open failed with error: %s", error->message);
dbus_g_method_return_error(session->context_claim_device, dbus_error); dbus_g_method_return_error(session->context_claim_device, dbus_error);
g_clear_pointer(&priv->username, g_free);
g_clear_pointer(&priv->session, g_free); g_clear_pointer(&priv->session, g_free);
return; return;
} }