Change call from check_alloc to pycheck_alloc
Free mem if returns before end of prediction