كتاب البر والصلة والآداب
45  
The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship
(34)
Chapter: Telling The One Who Carries A Weapon In The Masjid, Marketplace Or Other Place Where People Gather, To Hold It By Its Point
(34)
باب أَمْرِ مَنْ مَرَّ بِسِلاَحٍ فِي مَسْجِدٍ أَوْ سُوقٍ أَوْ غَيْرِهِمَا مِنَ الْمَوَاضِعِ الْجَامِعَةِ لِ
Sahih Muslim 2614 c

Jabir reported that Allah's Messenger (ﷺ) commanded a person who had been distributing arrows freely in the mosque that he should not move about in the mosque but by catching hold of their iron-heads. Ibn Rumh narrated this with a slight variation of wording.

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا لَيْثٌ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ رُمْحٍ، أَخْبَرَنَا اللَّيْثُ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ أَمَرَ رَجُلاً كَانَ يَتَصَدَّقُ بِالنَّبْلِ فِي الْمَسْجِدِ أَنْ لاَ يَمُرَّ بِهَا إِلاَّ وَهُوَ آخِذٌ بِنُصُولِهَا ‏.‏ وَقَالَ ابْنُ رُمْحٍ كَانَ يَصَّدَّقُ بِالنَّبْلِ ‏.‏
Reference : Sahih Muslim 2614c
In-book reference : Book 45, Hadith 160
USC-MSA web (English) reference : Book 32, Hadith 6333
  (deprecated numbering scheme)