device: Fix warning when open the device fails

The error should be initialised to NULL before being set.
This commit is contained in:
Christian Kellner
2017-02-16 15:45:40 +01:00
committed by Bastien Nocera
parent 0d28678118
commit e55ad52ded

View File

@ -604,7 +604,7 @@ static void dev_open_cb(struct fp_dev *dev, int status, void *user_data)
g_message("device %d claim status %d", priv->id, status);
if (status != 0) {
GError *error;
GError *error = NULL;
g_free (priv->sender);
priv->sender = NULL;