libgit2/libgit2 — pull request #2212 by arrbee (2014-03-27 22:35:48+00:00)
Title: Fix use-after-free in submodule reload code and other memory leaks

The always wonderful @ethomson found a use-after-free in the newly updates submodule reloading code. I'm not sure why `valgrind` doesn't notice this, but it seems like a serious problem.

In testing this update in valgrind, I found two other memory leaks that were mystifyingly overlooked by the previous update, too.