summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2016-02-01 10:56:27 +0100
committerFelix Fietkau <nbd@openwrt.org>2016-02-01 11:09:58 +0100
commitfb9beaa4d0d70300ea00b92f246f7edc08e9da5d (patch)
tree2f573cfe4b8af447fd380c79e1a2c449a4d933d7
parent1fceaa57f9359ab9792cc97aa81ba5af3f5ffca7 (diff)
system-linux: Fix memory leak
Call globfree to free dynamically allocated storage from a previous glob call Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--system-linux.c2
1 files changed, 2 insertions, 0 deletions
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