Fixed a memory leak.

This commit is contained in:
Armin Novak 2018-11-29 12:14:20 +01:00
parent d975fd0452
commit aeeaba5bc3

View File

@ -1394,11 +1394,17 @@ BOOL license_answer_license_request(rdpLicense* license)
license->EncryptedHardwareId->type = BB_ENCRYPTED_DATA_BLOB; license->EncryptedHardwareId->type = BB_ENCRYPTED_DATA_BLOB;
if (!license_encrypt_and_MAC(license, license->HardwareId, HWID_LENGTH, license->EncryptedHardwareId, signature)) if (!license_encrypt_and_MAC(license, license->HardwareId, HWID_LENGTH, license->EncryptedHardwareId, signature))
{
free(license_data);
return FALSE; return FALSE;
}
calBlob = license_new_binary_blob(BB_DATA_BLOB); calBlob = license_new_binary_blob(BB_DATA_BLOB);
if (!calBlob) if (!calBlob)
{
free(license_data);
return FALSE; return FALSE;
}
calBlob->data = license_data; calBlob->data = license_data;
calBlob->length = license_size; calBlob->length = license_size;