summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorRene Scharfe <l.s.r@web.de>2017-08-30 19:58:12 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-07 08:49:28 +0900
commitaeb014f6aecab6c72490dbe00fd9518b2c75db11 (patch)
tree48ac32c84a2234335651e436e5c2c2ba283c40e1 /refs.c
parent1f3992f4be09d47dd45af253743ac233c21f7986 (diff)
downloadgit-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index b0106b8162..d8dc86b1f5 100644
--- a/refs.c
+++ b/refs.c
@@ -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) {