Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
refs: plug strbuf leak in lock_ref_sha1_basic()
author
René Scharfe
<l.s.r@web.de>
Wed, 24 Dec 2014 00:18:45 +0000
(
01:18
+0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 29 Dec 2014 21:14:16 +0000
(13:14 -0800)
Don't just reset, but release the resource held by the local
variable that is about to go out of scope.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
bbcefff
)
diff --git
a/refs.c
b/refs.c
index 5fcacc6c41e6c7033367cc9c4cf7c18b33eea286..ed3b2cb405cc576f16e5b94d83683953b94e1e89 100644
(file)
--- 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_re
set
(&err);
+ strbuf_re
lease
(&err);
goto error_return;
}
}