Fixed a memory leak cause by not unmapping a mapped buffer when using dt...

...cpip element in passthrough mode.  Also simplified the logic for checking whether decrypting or not.