Add NULL check after malloc() in fortranobject.c

In fortranobject.c there was a `malloc()` without a `NULL` check on the returned pointer.
Try to follow numpy's [C style guide](https://github.com/numpy/numpy/blob/master/doc/C_STYLE_GUIDE.rst.txt#code-lay-out): this needs braces and the `goto` on a separate line.