The size being passed to calloc prior to this change was incorrectly
calculated. The value passed should have been the type, not a
dereferenced pointer to a scalar value that happens to be the type.
This also avoids a NULL pointer dereference, which would have resulted
in a crash.
This fixes a -Wfree-nonheap-object issue cited by gcc 14.
MFC after: 3 days
PR: 292916