static struct IP4_ARRAY *copy_ip4_array(TALLOC_CTX *ctx,
					const char *name,
					struct dnsp_ip4_array array)
{

	struct IP4_ARRAY *ip4_array = NULL;
	unsigned int i;

	ip4_array = talloc_zero(ctx, struct IP4_ARRAY);
	if (ip4_array == NULL) {
		DBG_ERR("Out of memory copying property [%s]\n", name);
		return NULL;
	}

	ip4_array->AddrCount = array.addrCount;
	if (ip4_array->AddrCount == 0) {
		return ip4_array;
	}

	ip4_array->AddrArray =
	    talloc_array(ip4_array, uint32_t, ip4_array->AddrCount);
	if (ip4_array->AddrArray == NULL) {
		TALLOC_FREE(ip4_array);
		DBG_ERR("Out of memory copying property [%s] values\n", name);
		return NULL;
	}

	for (i = 0; i < ip4_array->AddrCount; i++) {
		ip4_array->AddrArray[i] = array.addrArray[i];
	}

	return ip4_array;
}
static struct IP4_ARRAY *copy_ip4_array(TALLOC_CTX *ctx,
					const char *name,
					struct dnsp_ip4_array array)
{

	struct IP4_ARRAY *ip4_array = NULL;
	unsigned int i;

	ip4_array = talloc_zero(ctx, struct IP4_ARRAY);
	if (ip4_array == NULL) {
		DBG_ERR("Out of memory copying property [%s]\n", name);
		return NULL;
	}

	ip4_array->AddrCount = array.addrCount;
	if (ip4_array->AddrCount == 0) {
		return ip4_array;
	}

	ip4_array->AddrArray =
	    talloc_array(ip4_array, uint32_t, ip4_array->AddrCount);
	if (ip4_array->AddrArray == NULL) {
		TALLOC_FREE(ip4_array);
		DBG_ERR("Out of memory copying property [%s] values\n", name);
		return NULL;
	}

	for (i = 0; i < ip4_array->AddrCount; i++) {
		ip4_array->AddrArray[i] = array.addrArray[i];
	}

	return ip4_array;
}