Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-04 15:39:50 +0300
committerJunio C Hamano <gitster@pobox.com>2018-06-04 15:39:50 +0300
commit01cbd9eab5710a409e2e760fa20aeb701fa5e799 (patch)
tree937e4883ea81f673fc3fe58e47841533126e6b78 /refspec.c
parent7fe48cb39612d695240f64313b3aff9d4c3ccc43 (diff)
parentc3072c6e4db9130d0920bc8034f197624874de3d (diff)
Merge branch 'bw/refspec-api'
Hotfix. * bw/refspec-api: refspec-api: avoid uninitialized field in refspec item
Diffstat (limited to 'refspec.c')
-rw-r--r--refspec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/refspec.c b/refspec.c
index ada7854f7a..78edc48ae8 100644
--- a/refspec.c
+++ b/refspec.c
@@ -49,6 +49,8 @@ static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
size_t rlen = strlen(++rhs);
is_glob = (1 <= rlen && strchr(rhs, '*'));
item->dst = xstrndup(rhs, rlen);
+ } else {
+ item->dst = NULL;
}
llen = (rhs ? (rhs - lhs - 1) : strlen(lhs));