diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-10 14:43:26 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-10 15:30:04 +0100 |
commit | c62c298dc0901506fd8429e785fa8d673d876ac8 (patch) | |
tree | f036df132778dff48d8975838488a896105e2382 /jffsX-utils/mkfs.jffs2.c | |
parent | 84502bf120e45a8ce573bdf6e5c07eb9f59a9d6e (diff) |
mkfs.jffs2: don't leak temporary buffer if readlink fails
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'jffsX-utils/mkfs.jffs2.c')
-rw-r--r-- | jffsX-utils/mkfs.jffs2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c index 0661786..f46cc22 100644 --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c @@ -151,6 +151,7 @@ static char *xreadlink(const char *path) readsize = readlink(path, buf, bufsize); /* 1st try */ if (readsize == -1) { sys_errmsg("%s:%s", PROGRAM_NAME, path); + free(buf); return NULL; } } |