Skip to content

Commit 09ae634

Browse files
Christoph PaaschMimi Zohar
authored andcommitted
ima: Do not free 'entry' before it is initialized
7bc5f44 (ima: define new function ima_alloc_init_template() to API) moved the initialization of 'entry' in ima_add_boot_aggregate() a bit more below, after the if (ima_used_chip). So, 'entry' is not initialized while being inside this if-block. So, we should not attempt to free it. Found by Coverity (CID: 1131971) Fixes: 7bc5f44 (ima: define new function ima_alloc_init_template() to API) Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
1 parent a45299e commit 09ae634

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎security/integrity/ima/ima_init.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ static void __init ima_add_boot_aggregate(void)
6363
result = ima_calc_boot_aggregate(&hash.hdr);
6464
if (result < 0) {
6565
audit_cause = "hashing_error";
66-
kfree(entry);
6766
goto err_out;
6867
}
6968
}

0 commit comments

Comments
 (0)