Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / security / selinux / netif.c
index 718d7be..b10c34e 100644 (file)
@@ -114,13 +114,12 @@ static struct sel_netif *sel_netif_lookup(struct net_device *dev)
        if (likely(netif != NULL))
                goto out;
        
-       new = kmalloc(sizeof(*new), GFP_ATOMIC);
+       new = kzalloc(sizeof(*new), GFP_ATOMIC);
        if (!new) {
                netif = ERR_PTR(-ENOMEM);
                goto out;
        }
        
-       memset(new, 0, sizeof(*new));
        nsec = &new->nsec;
 
        ret = security_netif_sid(dev->name, &nsec->if_sid, &nsec->msg_sid);