From 0ea4f8ae416a9e8d15f4e20680879358f620e8b8 Mon Sep 17 00:00:00 2001 From: Dmitry Kasatkin Date: Sun, 29 Jan 2012 19:19:08 -0500 Subject: ima: free securityfs violations file On ima_fs_init() error, free securityfs violations file. Signed-off-by: Dmitry Kasatkin Signed-off-by: Mimi Zohar --- security/integrity/ima/ima_fs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'security/integrity/ima/ima_fs.c') diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c index e1aa2b482dd2..3fccc065a0fb 100644 --- a/security/integrity/ima/ima_fs.c +++ b/security/integrity/ima/ima_fs.c @@ -367,6 +367,7 @@ int __init ima_fs_init(void) return 0; out: + securityfs_remove(violations); securityfs_remove(runtime_measurements_count); securityfs_remove(ascii_runtime_measurements); securityfs_remove(binary_runtime_measurements); -- cgit v1.2.3 From c7de7adc18241a0eb10a6e1fed7cb1e01f53c85a Mon Sep 17 00:00:00 2001 From: Dmitry Kasatkin Date: Mon, 25 Jun 2012 12:18:10 +0300 Subject: ima: remove unused cleanup functions IMA cannot be used as module and does not need __exit functions. Removed them. Signed-off-by: Dmitry Kasatkin Signed-off-by: Mimi Zohar --- security/integrity/ima/ima_fs.c | 10 ---------- security/integrity/ima/ima_init.c | 5 ----- security/integrity/ima/ima_main.c | 5 ----- 3 files changed, 20 deletions(-) (limited to 'security/integrity/ima/ima_fs.c') diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c index 3fccc065a0fb..38477c9c3415 100644 --- a/security/integrity/ima/ima_fs.c +++ b/security/integrity/ima/ima_fs.c @@ -375,13 +375,3 @@ out: securityfs_remove(ima_policy); return -1; } - -void __exit ima_fs_cleanup(void) -{ - securityfs_remove(violations); - securityfs_remove(runtime_measurements_count); - securityfs_remove(ascii_runtime_measurements); - securityfs_remove(binary_runtime_measurements); - securityfs_remove(ima_dir); - securityfs_remove(ima_policy); -} diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c index 17f1f060306f..b5dfd534f13d 100644 --- a/security/integrity/ima/ima_init.c +++ b/security/integrity/ima/ima_init.c @@ -90,8 +90,3 @@ int __init ima_init(void) return ima_fs_init(); } - -void __exit ima_cleanup(void) -{ - ima_fs_cleanup(); -} diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index a0e631a19058..5b0548d75561 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -262,11 +262,6 @@ static int __init init_ima(void) return error; } -static void __exit cleanup_ima(void) -{ - ima_cleanup(); -} - late_initcall(init_ima); /* Start IMA after the TPM is available */ MODULE_DESCRIPTION("Integrity Measurement Architecture"); -- cgit v1.2.3