mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-21 20:08:24 +00:00
9e84d333b1
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
|
||
---|---|---|
.. | ||
cli.c | ||
crc.c | ||
Makefile | ||
nvram.c | ||
nvram.h | ||
sdinitvals.h |