Fix memory leak and other warnings from scan-build (clang) [CORRECTIVE]
See commits for details.
There's plenty more in UAE code but not going to touch that
One leak warning I'm not sure how to fix or if false positive:
../common/uadestate.c:1023:1: warning: Potential leak of memory pointed to by 'n..msg' [unix.Malloc]
}
^
../common/uadestate.c:1039:1: warning: Potential leak of memory pointed to by 'n..song_end.reason' [unix.Malloc]
}
^
2 warnings generated.
Edited by Matti Tiainen