libgit2/pygit2 — pull request #355 by carlosmn (2014-03-27 08:56:08+00:00)
Title: Make dealloc use tp_free or don't allow inheritance

When a class is a base type, it must use its type's tp_free function to
trigger the real free, instead of PyObjec_Del().

We do not always follow this convention, so let's give it a once-over
and make sure we do that or that it's not a base type. Many of the types
have the flag set in the struct, but do not pass the allocator function
at init time, which makes them not really be a base. Remove the flag for
those types.

---

I've only actually seen this be an issue with the credentials (in the version where they're in C). I'm not sure why that causes issues but the repository doesn't.