Fix resource leak in win32 code path, added free of locale filename.

This fixes Coverity CID 12901
Updater: Free tmp variable that might point to temp malloced memory

This fixes Coverity CID 12900