Also, `git_submodule_free` should do nothing if you accidentally pass it NULL. All libgit2 free functions check for that, I believe.