Fixed a bug in the hazard free everything function. Need to use a free
function that correspond to the malloc function used.