Fix possible memory leaks

The destroy functions of the dns_map and hash_map did not
free the pointers to the actual maps.