Fixed memory bug.  Was using sizeof on an int var when I actually wanted the value of the int for the malloc