openwrt/package/utils/nvram/src
BangLang Huang 9e84d333b1 nvram: fix memory leak
Fix memory leak on nvram_open() and nvram_open_rdonly().

For nvram_open(), the 'fd' should be closed on error, and
mmap_area should be unmap when nvram magic can not be found.

For nvram_open_rdonly(), the 'file' variable should free before
return. Once nvram_find_mtd() return successfully, it will allocate
memory to save mtd device string.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
(cherry picked from commit 1948d8e08c)
2017-12-13 16:23:39 +01:00
..
cli.c nvram: fix memory leak 2017-12-13 16:23:39 +01:00
crc.c
Makefile nvram: remove libnvram.so, it is unused and incompatible to the broadcom API anyway 2014-12-13 23:58:35 +00:00
nvram.c nvram: fix memory leak 2017-12-13 16:23:39 +01:00
nvram.h nvram: get rid of NVRAM_SPACE 2015-07-08 06:05:43 +00:00
sdinitvals.h