patch-2.4.22 linux-2.4.22/drivers/net/pcmcia/aironet4500_cs.c

Next file: linux-2.4.22/drivers/net/pcmcia/wavelan_cs.h
Previous file: linux-2.4.22/drivers/net/pci-skeleton.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/net/pcmcia/aironet4500_cs.c linux-2.4.22/drivers/net/pcmcia/aironet4500_cs.c
@@ -282,7 +282,7 @@
 	};
 	memset(dev,0,sizeof(struct net_device));
 	dev->priv = kmalloc(sizeof(struct awc_private), GFP_KERNEL);
-	if (!dev->priv ) {printk(KERN_CRIT "out of mem on dev priv alloc \n"); return NULL;};
+	if (!dev->priv ) {printk(KERN_CRIT "out of mem on dev priv alloc \n"); kfree(dev); return NULL;};
 	memset(dev->priv,0,sizeof(struct awc_private));
 	
 //	link->dev->minor = dev->minor;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)