BUG: add missing gufunc failure return values and missing malloc fail check
Merge pull request #4480 from juliantaylor/error-returns

BUG: add missing gufunc failure return values and missing malloc fail check