mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
channels/smartcard: fix possible mszReaders leak in smartcard_ListReaders(A/W)_Call
This commit is contained in:
@@ -323,12 +323,12 @@ static UINT32 smartcard_ListReadersA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD
|
||||
smartcard_trace_list_readers_return(smartcard, &ret, FALSE);
|
||||
status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret);
|
||||
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
return status;
|
||||
|
||||
if (mszReaders)
|
||||
SCardFreeMemory(operation->hContext, mszReaders);
|
||||
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
return status;
|
||||
|
||||
return ret.ReturnCode;
|
||||
}
|
||||
|
||||
@@ -371,15 +371,14 @@ static UINT32 smartcard_ListReadersW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD
|
||||
}
|
||||
|
||||
smartcard_trace_list_readers_return(smartcard, &ret, TRUE);
|
||||
|
||||
status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret);
|
||||
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
return status;
|
||||
|
||||
if (mszReaders)
|
||||
SCardFreeMemory(operation->hContext, mszReaders);
|
||||
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
return status;
|
||||
|
||||
return ret.ReturnCode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user