libgit2/libgit2 — pull request #1280 by nulltoken (2013-01-25 19:47:34+00:00)
Title: clone: Prevent segfault upon faulted remote creation

Properly dispose the remote being created, without altering the `out` parameter, when the process cannot be fulfilled. This fixes a segfault detected in libgit2/libgit2sharp#247 by @darind

Because of a trailing backslash in the url, the writing of the config file was failing.
This error was causing the freeing of the `out` remote in `git_remote_create()`.

The segfault was happening because the calling function was also attempting to free this same remote.

Note: The backslash issue has been fixed by @carlosmn in #1279