The value of nvram_tuple_t is allocated in _nvram_realloc,
but it is not freed in _nvram_free.
Signed-off-by: Zhai Zhaoxuan <zhaizhaoxuan@xiaomi.com>
(cherry picked from commit
c382237ac33a787043b22abc42f0c5a80278baae)
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;
/* Free dead table */
for (t = h->nvram_dead; t; t = next) {
next = t->next;
+ if (t->value)
+ free(t->value);
free(t);
}