diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-07-18 16:57:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-18 16:57:47 -0700 |
commit | 58b1ef2f0fce75ebf4fbf88e5bdf76a0afaeacce (patch) | |
tree | d88020de86478eeaa883f6626ba6a2f5fdd94e95 /refs.c | |
parent | 4525e8e41a8c0c4246a95097744604ea72198dad (diff) | |
parent | 78d3b06e0f5e6aaea001ee8e3e7c8e401dc4b244 (diff) | |
download | git-58b1ef2f0fce75ebf4fbf88e5bdf76a0afaeacce.tar.gz git-58b1ef2f0fce75ebf4fbf88e5bdf76a0afaeacce.tar.xz |
Merge branch 'maint'
* maint:
checkout -f: deal with a D/F conflict entry correctly
sha1_name.c: avoid unnecessary strbuf_release
refs.c: release file descriptor on error return
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1525,8 +1525,10 @@ int for_each_recent_reflog_ent(const char *ref, each_reflog_ent_fn fn, long ofs, if (fstat(fileno(logfp), &statbuf) || statbuf.st_size < ofs || fseek(logfp, -ofs, SEEK_END) || - fgets(buf, sizeof(buf), logfp)) + fgets(buf, sizeof(buf), logfp)) { + fclose(logfp); return -1; + } } while (fgets(buf, sizeof(buf), logfp)) { |