X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Frxrpc%2Ftransport.c;h=dbe6105e83a54e1f9ce66b4466a2863e0d7f155f;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=465efc86fccf1f253cf93a4e5705017e6e1dd83d;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/rxrpc/transport.c b/net/rxrpc/transport.c index 465efc86f..dbe6105e8 100644 --- a/net/rxrpc/transport.c +++ b/net/rxrpc/transport.c @@ -68,10 +68,11 @@ int rxrpc_create_transport(unsigned short port, _enter("%hu", port); - trans = kzalloc(sizeof(struct rxrpc_transport), GFP_KERNEL); + trans = kmalloc(sizeof(struct rxrpc_transport), GFP_KERNEL); if (!trans) return -ENOMEM; + memset(trans, 0, sizeof(struct rxrpc_transport)); atomic_set(&trans->usage, 1); INIT_LIST_HEAD(&trans->services); INIT_LIST_HEAD(&trans->link); @@ -311,12 +312,13 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans, _enter(""); - msg = kzalloc(sizeof(struct rxrpc_message), GFP_KERNEL); + msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL); if (!msg) { _leave(" = -ENOMEM"); return -ENOMEM; } + memset(msg, 0, sizeof(*msg)); atomic_set(&msg->usage, 1); list_add_tail(&msg->link,msgq);