replace malloc/memset(0) calls with calloc.

remove unneeded calls to memset by replacing some malloc calls with
calloc.