Skip to contentSkip to conversation

add kfree(ha) to drivers/scsi/ips.c

Kernel-janitors Domen Puncer 1 participant 1 message Jun 26, 2004

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi.

This has been on TODO as long as i remember, lets try to fix it. Compile tested.

ips_init_phase1 and ips_init_phase2 call ips_abort_init on failure, but it doesn't free 'ha'.
'ha' should be released on ips_release.

Needs review from someone who knows stuff a bit more.

drivers/scsi/ips.c +2 -0
@@ -729,6 +729,7 @@ ips_release(struct Scsi_Host *sh)
 	/* free IRQ */
 	free_irq(ha->irq, ha);
 
+	kfree(ha);
 	IPS_REMOVE_HOST(sh);
 	scsi_host_put(sh);
 
@@ -6946,6 +6947,7 @@ ips_abort_init(ips_ha_t * ha, int index)
 {
 	ha->active = 0;
 	ips_free(ha);
+	kfree(ha);
 	ips_ha[index] = 0;
 	ips_sh[index] = 0;
 	return -1;

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors