From e9b4f22d4b5f0f71fb2c05b9e80e7750e939ea05 Mon Sep 17 00:00:00 2001 From: Yu Shiqiang Date: Fri, 5 Jul 2019 03:18:14 -0400 Subject: [PATCH] [CP] Fix KW issues Fix KW issues. [Internal] Platforms: Gen8, Gen9, Gen10, Gen11, Gen12 OS: Linux Feature impact: HDCP Resolves: N/A Related-to: N/A Klocwork: PASS IP Scan: PASS Change-Id: Ied02d28338f1e93238bc70a1c992e199821cf2e1 Signed-off-by: Yu Shiqiang --- daemon/srm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/srm.cpp b/daemon/srm.cpp index 0613519..656622b 100644 --- a/daemon/srm.cpp +++ b/daemon/srm.cpp @@ -239,6 +239,8 @@ int32_t SrmTable::VerifySignature( if(DSA_SUCCESS != DSA_set0_pqg(dsa, p, q, g)) { + DSA_free(dsa); + DSA_SIG_free(sig); BN_free(p); BN_free(q); BN_free(g); @@ -260,6 +262,8 @@ int32_t SrmTable::VerifySignature( if(DSA_SUCCESS != DSA_set0_key(dsa, pub_key, nullptr)) { + DSA_free(dsa); + DSA_SIG_free(sig); BN_free(pub_key); return EINVAL; } @@ -269,6 +273,8 @@ int32_t SrmTable::VerifySignature( if(DSA_SUCCESS != DSA_SIG_set0(sig, r, s)) { + DSA_free(dsa); + DSA_SIG_free(sig); BN_free(r); BN_free(s); return EINVAL;