Commit a19fe3a1 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Memory leak in drivers_net_rruner.c

From:  Pablo Menichini <pablo@menichini.com.ar>
parent e7cb6b00
...@@ -111,16 +111,7 @@ static int __devinit rr_init_one(struct pci_dev *pdev, ...@@ -111,16 +111,7 @@ static int __devinit rr_init_one(struct pci_dev *pdev,
goto out2; goto out2;
} }
if (!dev->priv)
dev->priv = kmalloc(sizeof(*rrpriv), GFP_KERNEL);
if (!dev->priv) {
ret = -ENOMEM;
goto out2;
}
rrpriv = (struct rr_private *)dev->priv; rrpriv = (struct rr_private *)dev->priv;
memset(rrpriv, 0, sizeof(*rrpriv));
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment