diff --git a/srcpkgs/cJSON/patches/0001-fix-memory-leak.patch b/srcpkgs/cJSON/patches/0001-fix-memory-leak.patch new file mode 100644 index 00000000000..e24ccff3203 --- /dev/null +++ b/srcpkgs/cJSON/patches/0001-fix-memory-leak.patch @@ -0,0 +1,24 @@ +From 7b65bd348da0411f2d6db12f21f7562e7286416c Mon Sep 17 00:00:00 2001 +From: Alanscut +Date: Thu, 5 Dec 2019 11:05:07 +0800 +Subject: [PATCH] fix memory leak mentioned in issue 414 + +--- + cJSON_Utils.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git cJSON_Utils.c cJSON_Utils.c +index 7df4db2..b890d17 100644 +--- cJSON_Utils.c ++++ cJSON_Utils.c +@@ -216,6 +216,7 @@ CJSON_PUBLIC(char *) cJSONUtils_FindPointerFromObjectTo(const cJSON * const obje + if (child_index > ULONG_MAX) + { + cJSON_free(target_pointer); ++ cJSON_free(full_pointer); + return NULL; + } + sprintf((char*)full_pointer, "/%lu%s", (unsigned long)child_index, target_pointer); /* / */ +-- +2.24.0 + diff --git a/srcpkgs/cJSON/template b/srcpkgs/cJSON/template index 98595580c23..f8f7e9024ac 100644 --- a/srcpkgs/cJSON/template +++ b/srcpkgs/cJSON/template @@ -1,7 +1,7 @@ # Template file for 'cJSON' pkgname=cJSON version=1.7.12 -revision=1 +revision=2 build_style=cmake short_desc="Ultralightweight JSON parser in ANSI C" maintainer="Orphaned "