Commit b5dac75e authored by Dave Jones's avatar Dave Jones

[PATCH] Plug memory leak in iph5526

parent 84e5af5d
...@@ -3791,8 +3791,10 @@ struct pci_dev *pdev = NULL; ...@@ -3791,8 +3791,10 @@ struct pci_dev *pdev = NULL;
sprintf(fi->name, "fc%d", count); sprintf(fi->name, "fc%d", count);
host = scsi_register(tmpt, sizeof(struct iph5526_hostdata)); host = scsi_register(tmpt, sizeof(struct iph5526_hostdata));
if(host==NULL) if(host==NULL) {
kfree(fc[count]);
return no_of_hosts; return no_of_hosts;
}
hostdata = (struct iph5526_hostdata *)host->hostdata; hostdata = (struct iph5526_hostdata *)host->hostdata;
memset(hostdata, 0 , sizeof(struct iph5526_hostdata)); memset(hostdata, 0 , sizeof(struct iph5526_hostdata));
......
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