The source project of this merge request has been removed.
Also allocate terminating element.
On FreeBSD crashes have been experienced. Allocating only one element does not provide the final null one to end the list and causes access to unallocated memory.
Reported and patch provided by: Andrea Venturoli ml@netfence.it