Index | Thread | Search

From:
gonzalo <gonzalo@x61.sh>
Subject:
Fix: libyajl
To:
ports@openbsd.org
Date:
Wed, 22 May 2024 19:34:28 +0200

Download raw body.

Thread
  • gonzalo:

    Fix: libyajl

Hello,

Little update for fix libyajl:

https://github.com/lloyd/yajl/issues/250
https://github.com/openEuler-BaseService/yajl/commit/23a122eddaa28165a6c219000adcc31ff9a8a698

OK? Comments?

Cheers.-

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libyajl/Makefile,v
diff -u -p -r1.16 Makefile
--- Makefile	11 Mar 2022 18:50:42 -0000	1.16
+++ Makefile	8 May 2024 13:07:18 -0000
@@ -4,6 +4,7 @@ GH_ACCOUNT =	lloyd
 GH_PROJECT =	yajl
 GH_TAGNAME =	2.1.0
 PKGNAME =	lib${DISTNAME}
+REVISION =	0
 
 CATEGORIES =	devel
 
Index: patches/patch-src_yajl_tree_c
===================================================================
RCS file: patches/patch-src_yajl_tree_c
diff -N patches/patch-src_yajl_tree_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_yajl_tree_c	8 May 2024 13:07:18 -0000
@@ -0,0 +1,13 @@
+Index: src/yajl_tree.c
+--- src/yajl_tree.c.orig
++++ src/yajl_tree.c
+@@ -445,6 +445,9 @@ yajl_val yajl_tree_parse (const char *input,
+              YA_FREE(&(handle->alloc), internal_err_str);
+         }
+         yajl_free (handle);
++	//If the requested memory is not released in time, it will cause memory leakage
++	if(ctx.root)
++	     yajl_tree_free(ctx.root);
+         return NULL;
+     }
+ 
-- 

		 %gonzalo