Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e05d722e authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

[PATCH] kernel/nsproxy.c: use kmemdup()

parent 3e2a532b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -44,11 +44,9 @@ static inline struct nsproxy *clone_namespaces(struct nsproxy *orig)
{
	struct nsproxy *ns;

	ns = kmalloc(sizeof(struct nsproxy), GFP_KERNEL);
	if (ns) {
		memcpy(ns, orig, sizeof(struct nsproxy));
	ns = kmemdup(orig, sizeof(struct nsproxy), GFP_KERNEL);
	if (ns)
		atomic_set(&ns->count, 1);
	}
	return ns;
}