Hadithcore
Hadith #505080

Yahya related to me from Malik that Zayd ibn Aslam used to say, "No-one makes a dua without one of three things happening. Either it is answered, or it is stored up for him, or wrong actions are atoned for by it."

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

References2 variants
Sunnah.com reference
Book 15, Hadith 38
Arabic/English book reference
Book 15, Hadith 36