summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-01-12 11:38:30 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-01-12 11:38:31 -0800
commit97488abc91217d3ddb0f8fa4b14a51c2cfbde65d (patch)
treee7445baad36fecaa0a6fa47b2168e70c7c4e7ba0
parentMerge branch 'es/checkout-index-temp' (diff)
parentrefs: plug strbuf leak in lock_ref_sha1_basic() (diff)
downloadtgif-97488abc91217d3ddb0f8fa4b14a51c2cfbde65d.tar.xz
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()
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 5fcacc6c41..ed3b2cb405 100644
--- a/refs.c
+++ b/refs.c
@@ -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;
}
}