Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit e9b4f22

Browse files
committed
[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 <shiqiang.yu@intel.com>
1 parent 4f6ab65 commit e9b4f22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

daemon/srm.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ int32_t SrmTable::VerifySignature(
239239

240240
if(DSA_SUCCESS != DSA_set0_pqg(dsa, p, q, g))
241241
{
242+
DSA_free(dsa);
243+
DSA_SIG_free(sig);
242244
BN_free(p);
243245
BN_free(q);
244246
BN_free(g);
@@ -260,6 +262,8 @@ int32_t SrmTable::VerifySignature(
260262

261263
if(DSA_SUCCESS != DSA_set0_key(dsa, pub_key, nullptr))
262264
{
265+
DSA_free(dsa);
266+
DSA_SIG_free(sig);
263267
BN_free(pub_key);
264268
return EINVAL;
265269
}
@@ -269,6 +273,8 @@ int32_t SrmTable::VerifySignature(
269273

270274
if(DSA_SUCCESS != DSA_SIG_set0(sig, r, s))
271275
{
276+
DSA_free(dsa);
277+
DSA_SIG_free(sig);
272278
BN_free(r);
273279
BN_free(s);
274280
return EINVAL;

0 commit comments

Comments
 (0)