Replaced palloc with palloc0 where appropriate

Replacied palloc with palloc0 and removed the following memset() calls
to zero out the allocated memory.