Moved redundant call to realloc.