Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / net / rxrpc / transport.c
index dbe6105..465efc8 100644 (file)
@@ -68,11 +68,10 @@ int rxrpc_create_transport(unsigned short port,
 
        _enter("%hu", port);
 
-       trans = kmalloc(sizeof(struct rxrpc_transport), GFP_KERNEL);
+       trans = kzalloc(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);
@@ -312,13 +311,12 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans,
 
        _enter("");
 
-       msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL);
+       msg = kzalloc(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);