From 4596588e0f9e439ebaf60618cf96ddfffee9ebd1 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 4 Sep 2018 15:22:06 +0200 Subject: [PATCH] Set freed pointer to NULL avoiding double free. --- channels/smartcard/client/smartcard_operations.c | 1 + 1 file changed, 1 insertion(+) diff --git a/channels/smartcard/client/smartcard_operations.c b/channels/smartcard/client/smartcard_operations.c index b9b983ce7..23acaa3d9 100644 --- a/channels/smartcard/client/smartcard_operations.c +++ b/channels/smartcard/client/smartcard_operations.c @@ -501,6 +501,7 @@ static DWORD filter_device_by_name_w(wLinkedList* list, LPWSTR* mszReaders, DWOR return 0; free(*mszReaders); + *mszReaders = NULL; rc = filter_device_by_name_a(list, &readers, cchReaders); if (ConvertToUnicode(CP_UTF8, 0, &readers, rc, mszReaders, 0) != rc)