Skip to content

Commit af92726

Browse files
steven-bellockjyao1
authored andcommitted
Free memory on error
Fix #3334. Signed-off-by: Steven Bellock <[email protected]>
1 parent 3c8df8b commit af92726

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

os_stub/spdm_device_secret_lib_sample/key_pair.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ bool libspdm_write_key_pair_info(
471471
m_key_pair_info[key_pair_id - 1].assoc_cert_slot_mask =
472472
desired_assoc_cert_slot_mask;
473473
} else {
474+
free(cached_key_pair_info);
474475
return false;
475476
}
476477

0 commit comments

Comments
 (0)