Remove malloc cast

Since malloc's return is void * you shouldn't cast it to int*. 
See http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc