vendor/libgit2/src/fetch.c in rugged-1.4.2 vs vendor/libgit2/src/fetch.c in rugged-1.4.3

- old
+ new

@@ -74,11 +74,14 @@ oid_head = git__calloc(1, sizeof(git_remote_head)); GIT_ERROR_CHECK_ALLOC(oid_head); git_oid_fromstr(&oid_head->oid, spec->src); - oid_head->name = git__strdup(spec->dst); - GIT_ERROR_CHECK_ALLOC(oid_head->name); + + if (spec->dst) { + oid_head->name = git__strdup(spec->dst); + GIT_ERROR_CHECK_ALLOC(oid_head->name); + } if (git_vector_insert(&remote->local_heads, oid_head) < 0 || git_vector_insert(&remote->refs, oid_head) < 0) return -1;