Now that I look at this in context, it is not necessary.  You see in line 38 I do a NULL check.  If you are OOM, then a NULL pointer is returned to the user.  It will then be his/her responsibility to check the result.