From 1affbd0655c8d7203fc5715f3493519a9d6e2855 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 11 Apr 2024 10:12:02 +0200 Subject: [PATCH] [coverity] 1543285 Resource leak --- libfreerdp/core/gateway/arm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfreerdp/core/gateway/arm.c b/libfreerdp/core/gateway/arm.c index 015fd5057..2ec8d3e7b 100644 --- a/libfreerdp/core/gateway/arm.c +++ b/libfreerdp/core/gateway/arm.c @@ -558,6 +558,7 @@ static BOOL arm_pick_base64Utf16Field(const cJSON* json, const char* name, BYTE* if (!output2 || !len2) { WLog_ERR(TAG, "error when decode('utf-16') for %s", name); + free(output2); return FALSE; } @@ -567,6 +568,7 @@ static BOOL arm_pick_base64Utf16Field(const cJSON* json, const char* name, BYTE* if (!output || !*plen) { WLog_ERR(TAG, "error when second unbase64 for %s", name); + free(output); return FALSE; }