From 7b740f152f9532eb22bada99b62c8b19e4fc362f Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Fri, 17 Aug 2018 12:41:34 +0200 Subject: [PATCH] channels/addin: Fix leak found by covscan leaked_handle: Handle variable "hFind" going out of scope leaks the handle. --- channels/client/addin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/channels/client/addin.c b/channels/client/addin.c index 11e1fb890..0c82f9d79 100644 --- a/channels/client/addin.c +++ b/channels/client/addin.c @@ -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; }