fix memory leak in switch drivers (patch from #1132)
[openwrt-10.03/.git] / package / switch / src / switch-core.c
index 7bf705afe47f674affab6c6fcd4a13074566735f..5eeb803aa714614af6053f3aa9859fc5550fa5cf 100644 (file)
@@ -32,7 +32,7 @@
  *     ports: same syntax as for nvram's vlan*ports (eg. "1 2 3 4 5*")
  */
 
-#include <linux/config.h>
+#include <linux/autoconf.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <asm/uaccess.h>
@@ -100,6 +100,7 @@ static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff
                len = 0;
        }
 
+       kfree(page);
        return len;
 }