From 934bc4869eb04faea51beee8dc2f75a8378acab1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 13 Apr 2012 10:06:08 +0200 Subject: [PATCH] rpool: make xbps_handle::repo_pool array immutable after initialization. --- lib/repository_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repository_pool.c b/lib/repository_pool.c index 0249f05d..064e4186 100644 --- a/lib/repository_pool.c +++ b/lib/repository_pool.c @@ -124,7 +124,6 @@ xbps_repository_pool_init(struct xbps_handle *xhp) prop_object_release(d); goto out; } - prop_array_make_immutable(array); if (!xbps_add_obj_to_dict(d, array, "index")) { rv = EINVAL; prop_object_release(d); @@ -143,6 +142,7 @@ xbps_repository_pool_init(struct xbps_handle *xhp) goto out; } + prop_array_make_immutable(xhp->repo_pool); xbps_dbg_printf("[rpool] initialized ok.\n"); out: if (rv != 0)