* [PATCH] Compaq PCI Hotplug driver bugfix
@ 2002-01-16 18:41 Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2002-01-16 18:41 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Hi,
Here's a patch against 2.5.3-pre1 for the Compaq PCI Hotplug driver that
fixes two memory leaks in the driver (one if registering a slot fails,
and the other when the driver is unloaded from the kernel.)
thanks,
greg k-h
diff -Nru a/drivers/hotplug/cpqphp_core.c b/drivers/hotplug/cpqphp_core.c
--- a/drivers/hotplug/cpqphp_core.c Wed Jan 16 09:57:45 2002
+++ b/drivers/hotplug/cpqphp_core.c Wed Jan 16 09:57:45 2002
@@ -404,6 +404,10 @@
result = pci_hp_register (new_slot->hotplug_slot);
if (result) {
err ("pci_hp_register failed with error %d\n", result);
+ kfree (new_slot->hotplug_slot->info);
+ kfree (new_slot->hotplug_slot->name);
+ kfree (new_slot->hotplug_slot);
+ kfree (new_slot);
return result;
}
@@ -429,6 +433,8 @@
while (old_slot) {
next_slot = old_slot->next;
pci_hp_deregister (old_slot->hotplug_slot);
+ kfree(old_slot->hotplug_slot->info);
+ kfree(old_slot->hotplug_slot->name);
kfree(old_slot->hotplug_slot);
kfree(old_slot);
old_slot = next_slot;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Compaq PCI Hotplug driver bugfix
2002-01-16 20:59 Greg KH
@ 2002-01-16 19:58 ` Marcelo Tosatti
0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2002-01-16 19:58 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
Applied.
On Wed, 16 Jan 2002, Greg KH wrote:
> Hi,
>
> Here's a patch against 2.4.18-pre4 for the Compaq PCI Hotplug driver
> that fixes two memory leaks in the driver (one if registering a slot
> fails, and the other when the driver is unloaded from the kernel.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Compaq PCI Hotplug driver bugfix
@ 2002-01-16 20:59 Greg KH
2002-01-16 19:58 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2002-01-16 20:59 UTC (permalink / raw)
To: marcelo; +Cc: linux-kernel
Hi,
Here's a patch against 2.4.18-pre4 for the Compaq PCI Hotplug driver
that fixes two memory leaks in the driver (one if registering a slot
fails, and the other when the driver is unloaded from the kernel.)
thanks,
greg k-h
diff -Nru a/drivers/hotplug/cpqphp_core.c b/drivers/hotplug/cpqphp_core.c
--- a/drivers/hotplug/cpqphp_core.c Wed Jan 16 12:10:57 2002
+++ b/drivers/hotplug/cpqphp_core.c Wed Jan 16 12:10:57 2002
@@ -404,6 +404,10 @@
result = pci_hp_register (new_slot->hotplug_slot);
if (result) {
err ("pci_hp_register failed with error %d\n", result);
+ kfree (new_slot->hotplug_slot->info);
+ kfree (new_slot->hotplug_slot->name);
+ kfree (new_slot->hotplug_slot);
+ kfree (new_slot);
return result;
}
@@ -429,6 +433,8 @@
while (old_slot) {
next_slot = old_slot->next;
pci_hp_deregister (old_slot->hotplug_slot);
+ kfree(old_slot->hotplug_slot->info);
+ kfree(old_slot->hotplug_slot->name);
kfree(old_slot->hotplug_slot);
kfree(old_slot);
old_slot = next_slot;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-16 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-16 18:41 [PATCH] Compaq PCI Hotplug driver bugfix Greg KH
-- strict thread matches above, loose matches on Subject: below --
2002-01-16 20:59 Greg KH
2002-01-16 19:58 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox