Luckily, Dumbledore was able to find Hokey and retrieve the House-elf's real memories, which helped Harry and Dumbledore in their investigation into Voldemort's past and the creation of the Horcruxes.