Patch for memory leak

Hello!

Running valgrind for an unrelated issue, I saw that KIM leaks some memory and fixed it. A patch against version 1.2.2 is attached.

Cheers,
Tobias Brink

memleak.patch (988 Bytes)

Dear Tobias,

Thanks for the patch. It clearly fixes a memory leak. I have applied it to the development branch of the api and it will appear in the next official release.

Thanks! and Cheers,

Ryan

P.S. This is the first contribution to the api from outside the core KIM group. Thanks for officially bringing us into the open source world!

Speaking of which, I send you a github pull request for two fixes I needed while writing a test. Description is in the commit message.

Cheers,
Tobias

Hi Tobias,

This looks pretty good. Please rebase your changes on the current devel branch and I'll merge it....

Thanks,

Ryan