There is a DNS leak in the curl 7.28.1 (and probably earlier) similar to the one that was fixed for that release. Basically if you use CURLOPT_RESOLVE on an easy handle and then manually remove it from the multi, curl_multi_cleanup() will then not call Curl_hostcache_clean() to free the added DNS entries. Reproduction case attached.
Thanks for the report!
I've been able to repeat it. Next I'll turn it into a test case and see what I can do to fix it...
This problem doesn't exist anymore in 7.29.0. Closing as fixed.