[PATCH 2/3] reg: Replace heap_xrealloc() with heap_realloc()