My friend Harald Sitter noticed that pkgProblemResolver::ResolveByKeepInternal() in apt-pkg/algorithms.cc was leaking ~5 MiB of memory on his system (see
http://paste.kde.org/599138/) when it was called. From my estimation, the temporary package list used for dependency resolution that ResolveByKeepInternal is allocating is never being freed, making this indeed a leak.
I've developed a patch that deletes the temporary package list at both of the return points of the function. This patch can be found attached to this email. I've done basic testing such as making sure it compiles and making sure that ResolveByKeep() still works in simple cases.