This sentence is correct.
It means that when you talked to him, he would like a cup of coffee in that moment.
If you use the tense change for "would" as well (He said he would have loved a cup of coffee) it means that when you talked to him, he said he would've liked a cup of coffee at another occasion that's even more further in the past than your talk.
"He said he would love a cup of coffee so I made him one."
"He said (on tuesday) he would've loved a cup of coffee (on sunday)."
These sentences don't make much sense alone, but it conveys the feeling of the past tense well. Hope this helps!