remote: release strbuf after use in set_url()
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
b95c8ce8f3
commit
85af9f7a02
@ -1565,9 +1565,7 @@ static int set_url(int argc, const char **argv)
|
|||||||
"^$", 0);
|
"^$", 0);
|
||||||
else
|
else
|
||||||
git_config_set(name_buf.buf, newurl);
|
git_config_set(name_buf.buf, newurl);
|
||||||
strbuf_release(&name_buf);
|
goto out;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Old URL specified. Demand that one matches. */
|
/* Old URL specified. Demand that one matches. */
|
||||||
@ -1590,6 +1588,8 @@ static int set_url(int argc, const char **argv)
|
|||||||
git_config_set_multivar(name_buf.buf, newurl, oldurl, 0);
|
git_config_set_multivar(name_buf.buf, newurl, oldurl, 0);
|
||||||
else
|
else
|
||||||
git_config_set_multivar(name_buf.buf, NULL, oldurl, 1);
|
git_config_set_multivar(name_buf.buf, NULL, oldurl, 1);
|
||||||
|
out:
|
||||||
|
strbuf_release(&name_buf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user