aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/utils/nvram/src/nvram.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/utils/nvram/src/nvram.c b/package/utils/nvram/src/nvram.c
index ca89392107..d5e12ee69a 100644
--- a/package/utils/nvram/src/nvram.c
+++ b/package/utils/nvram/src/nvram.c
@@ -47,6 +47,8 @@ static void _nvram_free(nvram_handle_t *h)
for (i = 0; i < NVRAM_ARRAYSIZE(h->nvram_hash); i++) {
for (t = h->nvram_hash[i]; t; t = next) {
next = t->next;
+ if (t->value)
+ free(t->value);
free(t);
}
h->nvram_hash[i] = NULL;
@@ -55,6 +57,8 @@ static void _nvram_free(nvram_handle_t *h)
/* Free dead table */
for (t = h->nvram_dead; t; t = next) {
next = t->next;
+ if (t->value)
+ free(t->value);
free(t);
}