socket: fixed array to realloc pointers not elements