X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fcore%2Fdv.c;h=cf581407538c4b160947548b0fa350840b959dd0;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=29ee77f15932465115d64f7f5d01d395e69af6d6;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/net/core/dv.c b/net/core/dv.c index 29ee77f15..cf5814075 100644 --- a/net/core/dv.c +++ b/net/core/dv.c @@ -55,12 +55,15 @@ int alloc_divert_blk(struct net_device *dev) dev->divert = NULL; if (dev->type == ARPHRD_ETHER) { - dev->divert = kzalloc(alloc_size, GFP_KERNEL); + dev->divert = (struct divert_blk *) + kmalloc(alloc_size, GFP_KERNEL); if (dev->divert == NULL) { printk(KERN_INFO "divert: unable to allocate divert_blk for %s\n", dev->name); return -ENOMEM; } + + memset(dev->divert, 0, sizeof(struct divert_blk)); dev_hold(dev); }