diff options
author | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2021-05-16 11:46:32 +0100 |
---|---|---|
committer | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2021-05-20 11:56:38 +0100 |
commit | baf2a50ef3cf34574e12d2ab1b23578310f0d527 (patch) | |
tree | f00b68f395016571e230b02ba84c288c37d0e0a9 /tools/firmware-utils/src/mktplinkfw-lib.h | |
parent | 80be798d4a4fa4a3b3413a0a0ff42dd8ac88574d (diff) | |
download | upstream-baf2a50ef3cf34574e12d2ab1b23578310f0d527.tar.gz upstream-baf2a50ef3cf34574e12d2ab1b23578310f0d527.tar.bz2 upstream-baf2a50ef3cf34574e12d2ab1b23578310f0d527.zip |
firmware-utils: fix coverity zytrx.c resource leak
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>
Diffstat (limited to 'tools/firmware-utils/src/mktplinkfw-lib.h')
0 files changed, 0 insertions, 0 deletions