Fixed a calloc getting freed before being used
Merge pull request #325 from stqism/master

Fixed a calloc getting freed before being used