Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Duplicate the body of the utstring when returning it
Baptiste Daroussin committed 12 years ago
commit e089d9b00e7bc7d3e7e2799e10ce6a8a9394a83c
parent d55f151
1 file changed +3 -3
modified external/libucl/src/ucl_emitter.c
@@ -283,7 +283,7 @@ ucl_object_emit_json (ucl_object_t *obj, bool compact)

	ucl_obj_write_json (obj, buf, 0, false, compact);

-
	res = utstring_body (buf);
+
	res = strdup(utstring_body (buf));
	utstring_free (buf);

	return res;
@@ -422,7 +422,7 @@ ucl_object_emit_rcl (ucl_object_t *obj)

	ucl_elt_write_rcl (obj, buf, 0, false, true);

-
	res = utstring_body (buf);
+
	res = strdup(utstring_body (buf));
	utstring_free (buf);

	return res;
@@ -562,7 +562,7 @@ ucl_object_emit_yaml (ucl_object_t *obj)

	ucl_elt_write_yaml (obj, buf, 0, false, true);

-
	res = utstring_body (buf);
+
	res = strdup(utstring_body (buf));
	utstring_free (buf);

	return res;