[OpenWrt-Devel] [PATCH netifd 13/16] system-linux: Fix memory leak
Hans Dedecker
dedeckeh at gmail.com
Mon Feb 1 04:56:27 EST 2016
Call globfree to free dynamically allocated storage from a previous glob call
Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
system-linux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/system-linux.c b/system-linux.c
index 909ba0f..9978ade 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -1140,6 +1140,8 @@ system_if_set_rps_xps_val(const char *path, int val)
snprintf(val_buf, sizeof(val_buf), "%x", val);
for (i = 0; i < gl.gl_pathc; i++)
system_set_sysctl(gl.gl_pathv[i], val_buf);
+
+ globfree(&gl);
}
static void
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list