Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Duplicate the body of the utstring when returning it
Baptiste Daroussin committed 12 years ago
commit e089d9b00e7bc7d3e7e2799e10ce6a8a9394a83c
parent d55f151d8bd5f589ac85110f7e1f304da16ee6d3
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;