small patch for serial.c

Andreas Degert (ad@papyrus.hamburg.com)
25 Feb 1997 21:00:12 +0100


Each load/open device/close device/unload cycle of serial.o looses one
page. I've tested the patch on my pc. It's agaings 2.1.26.

diff -u --recursive linux-2.1/drivers/char/serial.c linux/drivers/char/serial.c
--- linux-2.1/drivers/char/serial.c Tue Feb 18 19:10:08 1997
+++ linux/drivers/char/serial.c Sun Feb 16 17:43:35 1997
@@ -3161,5 +3161,9 @@
if (rs_table[i].type != PORT_UNKNOWN)
release_region(rs_table[i].port, 8);
}
+ if (tmp_buf) {
+ free_page(tmp_buf);
+ tmp_buf = NULL;
+ }
}
#endif /* MODULE */