> if (NULL == (mpool_node = malloc (sizeof (mpool_node))))
That should instead be:
if (NULL == (mpool_node = malloc (sizeof (*mpool_node))))
^
This is such a common mistake that it would be nice if gcc
issued a warning.
Tom Truscott