Segmentation fault on git_clone

The code below produces a segfault with the ``0.19`` release and the ``development`` branch, while it does not with the ``0.18`` release:

    #include <git2.h>

    void main()
    {
        git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
        git_repository *repo;

        opts.fetch_spec = "refs/heads/test";
        git_clone(&repo, "path/to/libgit2/.git", "/tmp/kk", &opts);
    }

The error happens if ``opts.fetch_spec`` is a non existent reference.

A  ``git bisect`` points to commit ``9094ae5a3c12ee99743498cb8e895d18b932e4dd``