Added some frees for libgit2

Hopefully this should make everything cleaner