[gnome-settings-daemon/smartcard-Initialize-a-pointer-before-use] smartcard: Initialize a pointer before use
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/smartcard-Initialize-a-pointer-before-use] smartcard: Initialize a pointer before use
- Date: Mon, 4 Nov 2019 17:55:32 +0000 (UTC)
commit 0443b379b971f7740989643c233cca765256e12c
Author: Marek Kasik <mkasik redhat com>
Date: Mon Nov 4 18:52:18 2019 +0100
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.
plugins/smartcard/gsd-smartcard-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]