In the Order of the Phoenix, Harry and the others clean Sirius' house to make it more livable. During that they come across a heavy locket that no one could open. In the Half Blood Prince, Dumbledore shows Harry several memories in which they see the locket many times.
In the ending however, when they come to know about the Horcruxes and that the locket might be one of them, why doesn't Harry remember that locket?
He is shown to have a good memory throughout the books. For example, in the potions class in the 6th book he remembers that Snape told the class about the Bezoar from the 1st book.
If Harry had remembered about the locket being in Sirius' house, they wouldn't have gone on that pointless quest.