Skip to contentSkip to conversation

fix yenta memleak

PATCH In review Daniel Ritz 2 participants 2 messages Dec 28, 2003 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix yenta memleak

fix a memleak on yenta_socket unload.
against 2.6.0

drivers/pcmcia/yenta_socket.c +2 -0
@@ -648,6 +648,8 @@
 
 	pci_release_regions(dev);
 	pci_set_drvdata(dev, NULL);
+
+	kfree(sock);
 }
 
 
#1 lore raw
Quoted 2 lines · Daniel Ritz

fix a memleak on yenta_socket unload.
against 2.6.0

This looks fine; we don't allow the unload to continue until we've made sure that sysfs has finished using sock, which prevents us kfree'ing it while it's still in use.

I'll add this to the outgoing queue of pcmcia patches. Thanks.

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core