diff options
author | Rene Scharfe <l.s.r@web.de> | 2017-08-30 20:00:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-07 08:49:28 +0900 |
commit | 85af9f7a027dc5880fd88d65414df2dc6c6f9366 (patch) | |
tree | 719e98510bb4c38656f55ed15b6c5a6779360e2a /builtin/remote.c | |
parent | remote: release strbuf after use in migrate_file() (diff) | |
download | tgif-85af9f7a027dc5880fd88d65414df2dc6c6f9366.tar.xz |
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>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 0a56d7da66..33ba739332 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -1565,9 +1565,7 @@ static int set_url(int argc, const char **argv) "^$", 0); else git_config_set(name_buf.buf, newurl); - strbuf_release(&name_buf); - - return 0; + goto out; } /* 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); else git_config_set_multivar(name_buf.buf, NULL, oldurl, 1); +out: + strbuf_release(&name_buf); return 0; } |