mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* pcwatchdog firmware memory leak
@ 2003-05-15  3:31 davej
  0 siblings, 0 replies; only message in thread
From: davej @ 2003-05-15  3:31 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/char/watchdog/pcwd.c linux-2.5/drivers/char/watchdog/pcwd.c
--- bk-linus/drivers/char/watchdog/pcwd.c	2003-04-25 13:53:15.000000000 +0100
+++ linux-2.5/drivers/char/watchdog/pcwd.c	2003-04-26 15:08:04.000000000 +0100
@@ -594,6 +594,7 @@ static void __init pcwd_validate_timeout
  
 static int __init pcwatchdog_init(void)
 {
+	char *firmware;
 	int i, found = 0;
 	pcwd_validate_timeout();
 	spin_lock_init(&io_lock);
@@ -633,10 +634,12 @@ static int __init pcwatchdog_init(void)
 
 	if (revision == PCWD_REVISION_A)
 		printk(KERN_INFO "pcwd: PC Watchdog (REV.A) detected at port 0x%03x\n", current_readport);
-	else if (revision == PCWD_REVISION_C)
+	else if (revision == PCWD_REVISION_C) {
+		firmware = get_firmware();
 		printk(KERN_INFO "pcwd: PC Watchdog (REV.C) detected at port 0x%03x (Firmware version: %s)\n",
-			current_readport, get_firmware());
-	else {
+			current_readport, firmware);
+		kfree(firmware);
+	} else {
 		/* Should NEVER happen, unless get_revision() fails. */
 		printk("pcwd: Unable to get revision.\n");
 		return -1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-15  3:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-15  3:31 pcwatchdog firmware memory leak davej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®