kernel/acct.c: cleanup, also better to set related variable to NULL after kfree
PATCH v2 1/1 kernel/acct.c: cleanup, also better to set related variable to NULL after kfree
In reply to a message not in the archiveAfter kfree acct, also better to set ns->bacct to NULL.
Currently, it is as a cleanup patch.
Signed-off-by Chen Gang <[email protected]>
--- kernel/acct.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/acct.c +1 -0
@@ -332,6 +332,7 @@ void acct_exit_ns(struct pid_namespace *ns)spin_lock (&acct_lock);if (acct->file !=NULL )acct_file_reopen (acct,NULL ,NULL ); + ns->bacct =NULL ;spin_unlock (&acct_lock);kfree (acct);
Signature · 1 line
1.7.7.6