core/config: fix memory leak

Reported by Coverity s CID #1128441
plugins/gccgo: fix memory leak

Reported by Coverity as CID #1128440
Merge pull request #464 from xrmx/coverity2211

Fix a couple of memory leaks