summaryrefslogtreecommitdiff
path: root/builtin/send-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-04-25 00:57:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-25 02:00:15 (GMT)
commit627fde102515a7807dba89acaa88cb053b38a44a (patch)
tree3a255ca92f07db454e523baff730b18941eae6a8 /builtin/send-pack.c
parent0202c411edc25940cc381bf317badcdf67670be4 (diff)
downloadgit-627fde102515a7807dba89acaa88cb053b38a44a.zip
git-627fde102515a7807dba89acaa88cb053b38a44a.tar.gz
git-627fde102515a7807dba89acaa88cb053b38a44a.tar.bz2
submodule_init: die cleanly on submodules without url defined
When we init a submodule, we try to die when it has no URL defined: url = xstrdup(sub->url); if (!url) die(...); But that's clearly nonsense. xstrdup() will never return NULL, and if sub->url is NULL, we'll segfault. These two bits of code need to be flipped, so we check sub->url before looking at it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/send-pack.c')
0 files changed, 0 insertions, 0 deletions