summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1675862)
raw | patch | inline | side by side (parent: 1675862)
author | Bert Wesarg <bert.wesarg@googlemail.com> | |
Tue, 23 Feb 2010 20:11:53 +0000 (21:11 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 23 Feb 2010 22:24:43 +0000 (14:24 -0800) |
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rerere.c | patch | blob | history |
diff --git a/rerere.c b/rerere.c
index d1d3e753955146cadfaf6da274487a4a369f0521..a59f74f76c293efa783103eaf3d167c97b3768ea 100644 (file)
--- a/rerere.c
+++ b/rerere.c
static int merge(const char *name, const char *path)
{
int ret;
- mmfile_t cur, base, other;
+ mmfile_t cur = {NULL, 0}, base = {NULL, 0}, other = {NULL, 0};
mmbuffer_t result = {NULL, 0};
if (handle_file(path, NULL, rerere_path(name, "thisimage")) < 0)
if (read_mmfile(&cur, rerere_path(name, "thisimage")) ||
read_mmfile(&base, rerere_path(name, "preimage")) ||
- read_mmfile(&other, rerere_path(name, "postimage")))
- return 1;
+ read_mmfile(&other, rerere_path(name, "postimage"))) {
+ ret = 1;
+ goto out;
+ }
ret = ll_merge(&result, path, &base, &cur, "", &other, "", 0);
if (!ret) {
FILE *f = fopen(path, "w");
strerror(errno));
}
+out:
free(cur.ptr);
free(base.ptr);
free(other.ptr);