|Is this C or C++? If it's straight C, casting from void* is implicit. If it's C++, you should use new, which will throw on a problem. On either platform, you should be using size_t, not int.|
That said, strlen() returns the size of the string, minus the terminating null. You need to account for this null in your allocations.
if (region_root->region->name = malloc((strlen(name) + 1) * sizeof(char)))
How To Ask Questions The Smart Way