Commit be686f0
files_for_each_reflog_ent_reverse(): close stream and free strbuf on error
Exit the loop orderly through the cleanup code, instead of dashing out
with logfp still open and sb leaking.
Found with Cppcheck.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jeff King <peff@peff.net>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ac8ce18 commit be686f0
1 file changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3169 | 3169 | | |
3170 | 3170 | | |
3171 | 3171 | | |
3172 | | - | |
3173 | | - | |
| 3172 | + | |
| 3173 | + | |
3174 | 3174 | | |
3175 | 3175 | | |
3176 | 3176 | | |
| |||
3180 | 3180 | | |
3181 | 3181 | | |
3182 | 3182 | | |
3183 | | - | |
3184 | | - | |
3185 | | - | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
3186 | 3188 | | |
3187 | | - | |
3188 | | - | |
3189 | | - | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
3190 | 3194 | | |
3191 | 3195 | | |
3192 | 3196 | | |
| |||
0 commit comments