Merge branch 'rs/plug-strbuf-leak-in-lock-ref'

* rs/plug-strbuf-leak-in-lock-ref:
  refs: plug strbuf leak in lock_ref_sha1_basic()
This commit is contained in:
Junio C Hamano 2015-01-12 11:38:30 -08:00
commit 97488abc91

2
refs.c
View File

@ -2334,7 +2334,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
struct strbuf err = STRBUF_INIT;
unable_to_lock_message(ref_file, errno, &err);
error("%s", err.buf);
strbuf_reset(&err);
strbuf_release(&err);
goto error_return;
}
}