projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3baa716
)
channels/smartcard: Fix leak found by covscan
author
Ondrej Holy
<oholy@redhat.com>
Fri, 17 Aug 2018 12:19:19 +0000
(14:19 +0200)
committer
Ondrej Holy
<oholy@redhat.com>
Wed, 22 Aug 2018 11:35:43 +0000
(13:35 +0200)
leaked_storage: Variable "operation" going out of scope leaks the storage it points to.
channels/smartcard/client/smartcard_main.c
patch
|
blob
|
history
diff --git
a/channels/smartcard/client/smartcard_main.c
b/channels/smartcard/client/smartcard_main.c
index
2a5bc8d
..
37a223e
100644
(file)
--- a/
channels/smartcard/client/smartcard_main.c
+++ b/
channels/smartcard/client/smartcard_main.c
@@
-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;
}