Fix some memleaks in unedat.cpp

I'd advise someone doing a test compile of this branch before merging it. This should most definitely work. However, I'm on a mac at the moment, so it may fail on a Windows or Linux PC (however I strongly doubt this would be the case).

Either that, or simply wait until I'm on a Windows PC and can confirm it builds.