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

Commit 8b2ed4bb authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller
Browse files

[IPVS]: Use kmemdup where appropriate

parent e6b61105
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -80,10 +80,9 @@ ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
	if (!pp->unregister_app)
		return -EOPNOTSUPP;

	inc = kmalloc(sizeof(struct ip_vs_app), GFP_KERNEL);
	inc = kmemdup(app, sizeof(*inc), GFP_KERNEL);
	if (!inc)
		return -ENOMEM;
	memcpy(inc, app, sizeof(*inc));
	INIT_LIST_HEAD(&inc->p_list);
	INIT_LIST_HEAD(&inc->incs_list);
	inc->app = app;
+1 −7
Original line number Diff line number Diff line
@@ -118,13 +118,7 @@ void ip_vs_protocol_timeout_change(int flags)
int *
ip_vs_create_timeout_table(int *table, int size)
{
	int *t;

	t = kmalloc(size, GFP_ATOMIC);
	if (t == NULL)
		return NULL;
	memcpy(t, table, size);
	return t;
	return kmemdup(table, size, GFP_ATOMIC);
}