The communist government in China was not officially recognized by the UN at the time of the Korean War. The Nationalist government in Taiwan still held the UN seat and voted for the security resolution. If memory serves, the USSR ambassador was not present for the vote on that resolution for some unexplained reason.