channels/smartcard: Fix leak found by covscan
leaked_storage: Variable "operation" going out of scope leaks the storage it points to.
This commit is contained in:
parent
3baa716706
commit
97f25e8ab4
@ -377,10 +377,12 @@ UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
|
||||
|
||||
if (!Queue_Enqueue(smartcard->CompletedIrpQueue, (void*) irp))
|
||||
{
|
||||
free(operation);
|
||||
WLog_ERR(TAG, "Queue_Enqueue failed!");
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
free(operation);
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
@ -460,6 +462,7 @@ UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
|
||||
|
||||
if (!Queue_Enqueue(smartcard->CompletedIrpQueue, (void*) irp))
|
||||
{
|
||||
free(operation);
|
||||
WLog_ERR(TAG, "Queue_Enqueue failed!");
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user