Skip to content

Commit aeb014f

Browse files
rscharfegitster
authored andcommitted
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>
1 parent 1f3992f commit aeb014f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static int write_pseudoref(const char *pseudoref, const unsigned char *sha1,
612612
if (fd < 0) {
613613
strbuf_addf(err, "could not open '%s' for writing: %s",
614614
filename, strerror(errno));
615-
return -1;
615+
goto done;
616616
}
617617

618618
if (old_sha1) {

0 commit comments

Comments
 (0)