lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 24 Dec 2012 10:39:07 +0800 From: Chen Gang <gang.chen@...anux.com> To: akpm@...ux-foundation.org, jack@...e.cz CC: linux-ext4@...r.kernel.org Subject: [PATCH] fs/jbd: set pointer = NULL, after kfree it. set pointer = NULL, after call journal_destroy_revoke_table. in journal_destroy_revoke_table, it will call kfree to free the buffer. Signed-off-by: Chen Gang <gang.chen@...anux.com> --- fs/jbd/revoke.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c index 25c713e..d6457b0 100644 --- a/fs/jbd/revoke.c +++ b/fs/jbd/revoke.c @@ -295,6 +295,7 @@ int journal_init_revoke(journal_t *journal, int hash_size) fail1: journal_destroy_revoke_table(journal->j_revoke_table[0]); + journal->j_revoke_table[0] = NULL; fail0: return -ENOMEM; } @@ -303,10 +304,14 @@ fail0: void journal_destroy_revoke(journal_t *journal) { journal->j_revoke = NULL; - if (journal->j_revoke_table[0]) + if (journal->j_revoke_table[0]) { journal_destroy_revoke_table(journal->j_revoke_table[0]); - if (journal->j_revoke_table[1]) + journal->j_revoke_table[0] = NULL; + } + if (journal->j_revoke_table[1]) { journal_destroy_revoke_table(journal->j_revoke_table[1]); + journal->j_revoke_table[1] = NULL; + } } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists