Minor, but the `if (port)` test isn't needed - `git__free()` is a no-op on a NULL pointer. That applies to the checks above and below this, too.