diff options
author | Linus Torvalds | 2022-06-16 15:53:38 -0700 |
---|---|---|
committer | Linus Torvalds | 2022-06-16 15:53:38 -0700 |
commit | 0639b599f6f3cc871a9e024481a25a7d85946eb8 (patch) | |
tree | bceebfdbb3ed925bf2153ae70530330e8d577015 | |
parent | 6decbf75c93e654ce6cb0e93a02ca6575dce9922 (diff) | |
parent | ef79c396c664be99d0c5660dc75fe863c1e20315 (diff) |
Merge tag 'audit-pr-20220616' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit fix from Paul Moore:
"A single audit patch to fix a problem where we were not properly
freeing memory allocated when recording information related to a
module load"
* tag 'audit-pr-20220616' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
audit: free module name
-rw-r--r-- | kernel/auditsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index f3a2abd6d1a1..3a8c9d744800 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1014,10 +1014,10 @@ static void audit_reset_context(struct audit_context *ctx) ctx->target_comm[0] = '\0'; unroll_tree_refs(ctx, NULL, 0); WARN_ON(!list_empty(&ctx->killed_trees)); - ctx->type = 0; audit_free_module(ctx); ctx->fds[0] = -1; audit_proctitle_free(ctx); + ctx->type = 0; /* reset last for audit_free_*() */ } static inline struct audit_context *audit_alloc_context(enum audit_state state) |