Fix OOM throwing if it happens in finalizer reference

The Class::Alloc should return null if OOM happened during
adding finalizer reference, even if finalizable object is
allocated succesfully.

Change-Id: I66c1cdda50228bf1302839785ce4d4889b676f5b
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
2 files changed