From 2fefc29249877b9dd8b1006a4b0db56faa841991 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 11 Apr 2024 10:20:25 +0200 Subject: [PATCH] [coverity] 1543164 Free of address-of expression --- libfreerdp/core/license.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index e6c622a6b..e49c8f8fe 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -1114,10 +1114,9 @@ BOOL license_generate_hwid(rdpLicense* license) const char* hostname = license->rdp->settings->ClientHostname; wStream* s = Stream_StaticInit(&buffer, license->HardwareId, 4); Stream_Write_UINT32(s, license->PlatformId); - Stream_Free(s, TRUE); hashTarget = (const BYTE*)hostname; - targetLen = strlen(hostname); + targetLen = hostname ? strlen(hostname) : 0; } /* Allow FIPS override for use of MD5 here, really this does not have to be MD5 as we are just