Browse Source

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>
maint
Rene Scharfe 7 years ago committed by Junio C Hamano
parent
commit
aeb014f6ae
  1. 2
      refs.c

2
refs.c

@ -612,7 +612,7 @@ static int write_pseudoref(const char *pseudoref, const unsigned char *sha1, @@ -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) {

Loading…
Cancel
Save