diff mbox

[OpenWrt-Devel,netifd,13/16] system-linux: Fix memory leak

Message ID 1454320590-20710-13-git-send-email-dedeckeh@gmail.com
State Accepted
Headers show

Commit Message

Hans Dedecker Feb. 1, 2016, 9:56 a.m. UTC
Call globfree to free dynamically allocated storage from a previous glob call

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
---
 system-linux.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

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