destroy/close when appriate and for all cases. Thanks to Michael Allen for point out the memory-leak that I also fixed. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22596 ec53bebd-3082-4978-b11e-865c3cabbd6b