Rather than sprinkling magical numbers everywhere, we can use sizeof()
for the size of a fixed size array.
From Dirk Engling <erdgeist@erdgeist.org>
Make sure ret->name is NULL'ed before return when freeing.
from Dirk Engling <erdgeist@erdgeist.org>