alfred: free globals. Fixes memory leak
alfred: use calloc instead of malloc + memset

calloc will allocate memory, just like malloc, and set it to zero.

Some variables in globals were initialized to NULL/0. This has been
removed as those fields are guaranteed to be zero by calloc.