diff --git a/xdiff-interface.c b/xdiff-interface.c
index e1e054e4d982de30d8a9c8c4109c6d62448f62a9..0e2c169227ad29b5bf546c6c1b97e1a1d8ed7409 100644 (file)
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
return error("Could not open %s", filename);
sz = xsize_t(st.st_size);
ptr->ptr = xmalloc(sz ? sz : 1);
- if (sz && fread(ptr->ptr, sz, 1, f) != 1)
+ if (sz && fread(ptr->ptr, sz, 1, f) != 1) {
+ fclose(f);
return error("Could not read %s", filename);
+ }
fclose(f);
ptr->size = sz;
return 0;
int git_xmerge_config(const char *var, const char *value, void *cb)
{
- if (!strcasecmp(var, "merge.conflictstyle")) {
+ if (!strcmp(var, "merge.conflictstyle")) {
if (!value)
die("'%s' is not a boolean", var);
if (!strcmp(value, "diff3"))