summaryrefslogtreecommitdiff
path: root/refspec.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-04 12:39:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-04 12:39:50 (GMT)
commit01cbd9eab5710a409e2e760fa20aeb701fa5e799 (patch)
tree937e4883ea81f673fc3fe58e47841533126e6b78 /refspec.c
parent7fe48cb39612d695240f64313b3aff9d4c3ccc43 (diff)
parentc3072c6e4db9130d0920bc8034f197624874de3d (diff)
downloadgit-01cbd9eab5710a409e2e760fa20aeb701fa5e799.zip
git-01cbd9eab5710a409e2e760fa20aeb701fa5e799.tar.gz
git-01cbd9eab5710a409e2e760fa20aeb701fa5e799.tar.bz2
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 ada7854..78edc48 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));