git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
bbcefff
)
refs: plug strbuf leak in lock_ref_sha1_basic()
author
René Scharfe
<redacted>
Wed, 24 Dec 2014 00:18:45 +0000
(
01:18
+0100)
committer
Junio C Hamano
<redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
refs.c
patch
|
blob
|
history
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;
}
}
git clone https://git.99rst.org/PROJECT