Clean up error return code in alloccommon.c

Clean up the duplicate code as Pascal suggested.

Change-Id: I685fcbb488502e969f6cb73a46db3ea79b90910d
1 file changed