vendor/libgit2/src/refspec.c in rugged-0.27.1 vs vendor/libgit2/src/refspec.c in rugged-0.27.2

- old
+ new

@@ -302,18 +302,21 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs) { git_buf buf = GIT_BUF_INIT; size_t j, pos; git_remote_head key; + git_refspec *cur; const char* formatters[] = { GIT_REFS_DIR "%s", GIT_REFS_TAGS_DIR "%s", GIT_REFS_HEADS_DIR "%s", NULL }; - git_refspec *cur = git__calloc(1, sizeof(git_refspec)); + assert(out && spec && refs); + + cur = git__calloc(1, sizeof(git_refspec)); GITERR_CHECK_ALLOC(cur); cur->force = spec->force; cur->push = spec->push; cur->pattern = spec->pattern;