mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] security/integrity/ima/ima_iint.c: Remove goto out int  ima_inode_alloc()
@ 2010-02-08  6:57 wzt wzt
  2010-02-08  7:08 ` Xiaotian Feng
  0 siblings, 1 reply; 2+ messages in thread
From: wzt wzt @ 2010-02-08  6:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: zohar

Signed-off-by: wzt <zhitong.wangzt@alibaba-inc.com>

diff --git a/security/integrity/ima/ima_iint.c
b/security/integrity/ima/ima_iint.c
index 0d83edc..4e2df22 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -57,18 +57,17 @@ int ima_inode_alloc(struct inode *inode)
                return -ENOMEM;

        rc = radix_tree_preload(GFP_NOFS);
-       if (rc < 0)
-               goto out;
+       if (rc < 0) {
+               kmem_cache_free(iint_cache, iint);
+               radix_tree_preload_end();
+               return rc;
+       }

        spin_lock(&ima_iint_lock);
        rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint);
        spin_unlock(&ima_iint_lock);
-out:
-       if (rc < 0)
-               kmem_cache_free(iint_cache, iint);

        radix_tree_preload_end();
-
        return rc;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-08  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08  6:57 [PATCH] security/integrity/ima/ima_iint.c: Remove goto out int ima_inode_alloc() wzt wzt
2010-02-08  7:08 ` Xiaotian Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®