From 52978be636374c4bfb61220b37fa12f55a071c46 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Sat, 30 Sep 2006 23:27:21 -0700 Subject: [PATCH] kmemdup: some users Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- net/rxrpc/transport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/rxrpc') diff --git a/net/rxrpc/transport.c b/net/rxrpc/transport.c index 465efc86fccf..94b2e2fe6fdb 100644 --- a/net/rxrpc/transport.c +++ b/net/rxrpc/transport.c @@ -381,11 +381,10 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans, /* allocate a new message record */ ret = -ENOMEM; - msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL); + msg = kmemdup(jumbomsg, sizeof(struct rxrpc_message), GFP_KERNEL); if (!msg) goto error; - memcpy(msg, jumbomsg, sizeof(*msg)); list_add_tail(&msg->link, msgq); /* adjust the jumbo packet */ -- cgit v1.2.3