Fix memory leaks.


git-svn-id: http://qmcpack.googlecode.com/svn@5411 4bc5593c-822e-11de-b41d-d982dfe7be50