Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/jshn.c
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-11-19 14:34:14 +0300
committerPetr Štetiar <ynezz@true.cz>2019-11-24 15:26:58 +0300
commitc42f11cc7c0f0ec6571af06ada6ff0e8882f4fde (patch)
tree00f0be0f00fa159ca6e218a160490ba9e6c35167 /jshn.c
parent93848ec96dc58bbeb4bb3ed84fa5848ce5a04667 (diff)
jshn: main: fix leak of memory pointed to by 'vars'
Fixes following leak of memory: 6,016 bytes in 1 blocks are possibly lost in loss record 1 of 1 at 0x4C31B25: calloc by 0x1098F8: main (jshn.c:353) Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'jshn.c')
-rw-r--r--jshn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/jshn.c b/jshn.c
index 1efe254..2eebe6c 100644
--- a/jshn.c
+++ b/jshn.c
@@ -443,12 +443,15 @@ int main(int argc, char **argv)
indent = true;
break;
default:
+ free(vars);
return usage(argv[0]);
}
}
+ free(vars);
return usage(argv[0]);
exit:
+ free(vars);
return ret;
}