Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
dir-iterator: release strbuf after use
author
René Scharfe
<l.s.r@web.de>
Wed, 7 Aug 2019 11:15:14 +0000
(13:15 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 7 Aug 2019 19:25:35 +0000
(12:25 -0700)
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
c4d9c50
)
diff --git
a/refs/files-backend.c
b/refs/files-backend.c
index b1f8f53a098da3525fdff5011b93f39138df3df2..d60767ab739f0e20e45c700368f7f9f24a52c3f8 100644
(file)
--- a/
refs/files-backend.c
+++ b/
refs/files-backend.c
@@
-2151,8
+2151,10
@@
static struct ref_iterator *reflog_iterator_begin(struct ref_store *ref_store,
strbuf_addf(&sb, "%s/logs", gitdir);
diter = dir_iterator_begin(sb.buf, 0);
- if(!diter)
+ if (!diter) {
+ strbuf_release(&sb);
return empty_ref_iterator_begin();
+ }
iter = xcalloc(1, sizeof(*iter));
ref_iterator = &iter->base;