diff options
author | Rene Scharfe <l.s.r@web.de> | 2017-08-30 19:58:12 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-07 08:49:28 +0900 |
commit | aeb014f6aecab6c72490dbe00fd9518b2c75db11 (patch) | |
tree | 48ac32c84a2234335651e436e5c2c2ba283c40e1 /refs.c | |
parent | 1f3992f4be09d47dd45af253743ac233c21f7986 (diff) | |
download | git-aeb014f6aecab6c72490dbe00fd9518b2c75db11.tar.gz |
refs: release strbuf on error return in write_pseudoref()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -612,7 +612,7 @@ static int write_pseudoref(const char *pseudoref, const unsigned char *sha1, if (fd < 0) { strbuf_addf(err, "could not open '%s' for writing: %s", filename, strerror(errno)); - return -1; + goto done; } if (old_sha1) { |