It is better for a man's belly to be stuffed with pus which corrodes it than to stuff (one's mind) with frivolous poetry. Abu Bakr has reported it with a slight variation of wording.
قَالَ رَسُولُ اللَّهِ ﷺ لأَنْ يَمْتَلِئَ جَوْفُ الرَّجُلِ قَيْحًا يَرِيهِ خَيْرٌ مِنْ أَنْ يَمْتَلِئَ شِعْرًا قَالَ أَبُو بَكْرٍ إِلاَّ أَنَّ حَفْصًا لَمْ يَقُلْ يَرِيهِ