Commit 6899c161 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull selinux fix from Paul Moore:
 "A single SELinux patch to fix an error path that was doing the wrong
  thing with respect to freeing memory"

* tag 'selinux-pr-20220518' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: fix bad cleanup on error in hashtab_duplicate()
parents 5494d0eb 6254bd3d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -179,7 +179,8 @@ int hashtab_duplicate(struct hashtab *new, struct hashtab *orig,
			kmem_cache_free(hashtab_node_cachep, cur);
		}
	}
	kmem_cache_free(hashtab_node_cachep, new);
	kfree(new->htable);
	memset(new, 0, sizeof(*new));
	return -ENOMEM;
}