summaryrefslogtreecommitdiff
path: root/plugins/smartcard
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2019-11-04 18:52:18 +0100
committerBenjamin Berg <benjamin@sipsolutions.net>2019-12-12 10:24:59 +0000
commit00e1d44840b4b3dcda46cb405cb5bd320205e4e7 (patch)
tree5e500a605ec7e2cb462a742e2733915c5bf035b2 /plugins/smartcard
parent404d4537e0e06c748505a0e5243f737ac9f08d81 (diff)
downloadgnome-settings-daemon-00e1d44840b4b3dcda46cb405cb5bd320205e4e7.tar.gz
smartcard: Initialize a pointer before use
Pointer to PK11SlotInfo in watch_one_event_from_driver() could be used uninitialized after one of my commits. This commit fixes it.
Diffstat (limited to 'plugins/smartcard')
-rw-r--r--plugins/smartcard/gsd-smartcard-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c
index d43d5c79..fc6ae0b0 100644
--- a/plugins/smartcard/gsd-smartcard-manager.c
+++ b/plugins/smartcard/gsd-smartcard-manager.c
@@ -180,7 +180,7 @@ watch_one_event_from_driver (GsdSmartcardManager *self,
GCancellable *cancellable,
GError **error)
{
- PK11SlotInfo *card, *old_card;
+ PK11SlotInfo *card = NULL, *old_card;
CK_SLOT_ID slot_id;
gulong handler_id;
int old_slot_series = -1, slot_series;