Commit 0639b599 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 6decbf75 ef79c396
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)