channels/addin: Fix leak found by covscan

leaked_handle: Handle variable "hFind" going out of scope leaks the handle.
This commit is contained in:
Ondrej Holy 2018-08-17 12:41:34 +02:00
parent 926ac4f938
commit 7b740f152f

View File

@ -220,6 +220,7 @@ FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSub
if (!ppAddins)
{
FindClose(hFind);
WLog_ERR(TAG, "calloc failed!");
return NULL;
}
@ -298,6 +299,7 @@ FREERDP_ADDIN** freerdp_channels_list_dynamic_addins(LPSTR pszName, LPSTR pszSub
ppAddins[nAddins] = NULL;
return ppAddins;
error_out:
FindClose(hFind);
freerdp_channels_addin_list_free(ppAddins);
return NULL;
}