lib.c: Use the size of the element when allocating an array.