projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-merge: make recursive the default strategy
[git.git]
/
csum-file.c
diff --git
a/csum-file.c
b/csum-file.c
index
c8c7369
..
c66b9eb
100644
(file)
--- a/
csum-file.c
+++ b/
csum-file.c
@@
-45,6
+45,7
@@
int sha1close(struct sha1file *f, unsigned char *result, int update)
sha1flush(f, 20);
if (close(f->fd))
die("%s: sha1 file error on close (%s)", f->name, strerror(errno));
sha1flush(f, 20);
if (close(f->fd))
die("%s: sha1 file error on close (%s)", f->name, strerror(errno));
+ free(f);
return 0;
}
return 0;
}
@@
-86,7
+87,7
@@
struct sha1file *sha1create(const char *fmt, ...)
die("you wascally wabbit, you");
f->namelen = len;
die("you wascally wabbit, you");
f->namelen = len;
- fd = open(f->name, O_CREAT | O_EXCL | O_WRONLY, 06
44
);
+ fd = open(f->name, O_CREAT | O_EXCL | O_WRONLY, 06
66
);
if (fd < 0)
die("unable to open %s (%s)", f->name, strerror(errno));
f->fd = fd;
if (fd < 0)
die("unable to open %s (%s)", f->name, strerror(errno));
f->fd = fd;