Language: C
Label: safe
CWE: NVD-CWE-noinfo \u2014 

Code:
dup_dest_constraints(const struct dest_constraint *dcs, size_t ndcs)
{
	size_t i;
	struct dest_constraint *ret;

	if (ndcs == 0)
		return NULL;
	ret = xcalloc(ndcs, sizeof(*ret));
	for (i = 0; i < ndcs; i++) {
		dup_dest_constraint_hop(&dcs[i].from, &ret[i].from);
		dup_dest_constraint_hop(&dcs[i].to, &ret[i].to);
	}
	return ret;
}