diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-06-04 21:39:50 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-04 21:39:50 +0900 |
commit | 01cbd9eab5710a409e2e760fa20aeb701fa5e799 (patch) | |
tree | 937e4883ea81f673fc3fe58e47841533126e6b78 | |
parent | Merge branch 'tg/doc-sec-list' (diff) | |
parent | refspec-api: avoid uninitialized field in refspec item (diff) | |
download | tgif-01cbd9eab5710a409e2e760fa20aeb701fa5e799.tar.xz |
Merge branch 'bw/refspec-api'
Hotfix.
* bw/refspec-api:
refspec-api: avoid uninitialized field in refspec item
-rw-r--r-- | refspec.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)); |