diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-06-04 15:39:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-04 15:39:50 +0300 |
commit | 01cbd9eab5710a409e2e760fa20aeb701fa5e799 (patch) | |
tree | 937e4883ea81f673fc3fe58e47841533126e6b78 /refspec.c | |
parent | 7fe48cb39612d695240f64313b3aff9d4c3ccc43 (diff) | |
parent | c3072c6e4db9130d0920bc8034f197624874de3d (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.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)); |