mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +00:00
27f4559281
fix coverity resource leak warning:
*len = stat.st_size;
mapped = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (close(fd) < 0)
CID 1484880: Resource leaks (RESOURCE_LEAK)
Variable "mapped" going out of scope leaks the storage it points to.
return NULL;
return mapped;
}
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
|
||
---|---|---|
.. | ||
src | ||
Makefile |