remove unnecessary jump
remove possible free-after-realloc problem; close #1570