Commit 7405ed28 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] Memory leak in ixj_pcmcia driver

Found by checker (David Yu Chen @Stanford)
parent 8912ad07
...@@ -60,8 +60,10 @@ static dev_link_t *ixj_attach(void) ...@@ -60,8 +60,10 @@ static dev_link_t *ixj_attach(void)
link->conf.Vcc = 50; link->conf.Vcc = 50;
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
link->priv = kmalloc(sizeof(struct ixj_info_t), GFP_KERNEL); link->priv = kmalloc(sizeof(struct ixj_info_t), GFP_KERNEL);
if (!link->priv) if (!link->priv) {
kfree(link);
return NULL; return NULL;
}
memset(link->priv, 0, sizeof(struct ixj_info_t)); memset(link->priv, 0, sizeof(struct ixj_info_t));
/* Register with Card Services */ /* Register with Card Services */
link->next = dev_list; link->next = dev_list;
......
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