Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d881901 authored by Michal Schmidt's avatar Michal Schmidt Committed by John W. Linville
Browse files

[PATCH] airo: Fix an error path memory leak



The airo driver leaks memory if request_irq() fails.

Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 21665a69
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2852,7 +2852,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
	if (rc) {
		airo_print_err(dev->name, "register interrupt %d failed, rc %d",
				irq, rc);
		goto err_out_unlink;
		goto err_out_nets;
	}
	if (!is_pcmcia) {
		if (!request_region( dev->base_addr, 64, dev->name )) {
@@ -2935,6 +2935,8 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
	        release_region( dev->base_addr, 64 );
err_out_irq:
	free_irq(dev->irq, dev);
err_out_nets:
	airo_networks_free(ai);
err_out_unlink:
	del_airo_dev(dev);
err_out_thr: