Skip to content

Commit 0639b59

Browse files
committed
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
2 parents 6decbf7 + ef79c39 commit 0639b59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/auditsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,10 +1014,10 @@ static void audit_reset_context(struct audit_context *ctx)
10141014
ctx->target_comm[0] = '\0';
10151015
unroll_tree_refs(ctx, NULL, 0);
10161016
WARN_ON(!list_empty(&ctx->killed_trees));
1017-
ctx->type = 0;
10181017
audit_free_module(ctx);
10191018
ctx->fds[0] = -1;
10201019
audit_proctitle_free(ctx);
1020+
ctx->type = 0; /* reset last for audit_free_*() */
10211021
}
10221022

10231023
static inline struct audit_context *audit_alloc_context(enum audit_state state)

0 commit comments

Comments
 (0)