Sahih al-Bukhari, Volume 2, Book 16, Hadith 105 (USC-MSA)

Narrated Ibn `Umar: Once a person asked Allah's Messenger about the night prayer. Allah's Apostle replied, "The night prayer is offered as two Rak`at followed by two Rak`at and so on and if anyone is afraid of the approaching dawn (Fajr prayer) he should pray one Rak`ah and this will be a Witr for all the Rak`at which he has prayed before."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ نَافِعٍ، وَعَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَجُلاً، سَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ صَلاَةِ اللَّيْلِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ صَلاَةُ اللَّيْلِ مَثْنَى مَثْنَى، فَإِذَا خَشِيَ أَحَدُكُمُ الصُّبْحَ صَلَّى رَكْعَةً وَاحِدَةً، تُوتِرُ لَهُ مَا قَدْ صَلَّى ‏" ‏‏.‏

sunnah.com

Nafi` told that `Abdullah bin `Umar used to say Taslim between (the first) two Rak`at and (the third) odd one in the Witr prayer, when he wanted to attend to a certain matter (during that interval between the Rak`at).

وَعَنْ نَافِعٍ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، كَانَ يُسَلِّمُ بَيْنَ الرَّكْعَةِ وَالرَّكْعَتَيْنِ فِي الْوِتْرِ، حَتَّى يَأْمُرَ بِبَعْضِ حَاجَتِهِ‏.‏

sunnah.com