Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix segfault on exit if the configuration parser has fallback on yaml
Baptiste Daroussin committed 12 years ago
commit 6f47faab444000fad3ab9d7e7950807ef18bb51d
parent be8da8f
1 file changed +3 -2
modified libpkg/pkg_config.c
@@ -829,8 +829,10 @@ load_repo_file(const char *repofile)
	}

	if (fallback) {
-
		if (obj != NULL)
+
		if (obj != NULL) {
			ucl_obj_free(obj);
+
			ucl_parser_free(p);
+
		}
		obj = yaml_to_ucl(repofile, NULL, 0);
		if (obj == NULL)
			return;
@@ -850,7 +852,6 @@ load_repo_file(const char *repofile)
	if (obj->type == UCL_OBJECT)
		walk_repo_obj(obj->value.ov);

-
	ucl_parser_free(p);
	ucl_obj_free(obj);
}