DB-756 fix realloc crash