summaryrefslogtreecommitdiff
path: root/builtin-rerere.c
diff options
context:
space:
mode:
authorJunio C Hamano <junio@pobox.com>2008-06-17 00:23:31 -0700
committerJunio C Hamano <gitster@pobox.com>2008-06-17 16:39:59 -0700
commit1a8fb155cff5b19bc41ee3ac96e34f0f2ad95763 (patch)
tree77c869be217a7ff7c67049f469aa49f513327b7b /builtin-rerere.c
parent61fb0b75d138032c7600fe86640897b900f2fd4f (diff)
downloadgit-1a8fb155cff5b19bc41ee3ac96e34f0f2ad95763.tar.gz
builtin-rerere: fix a small leak
The data read from MERGE_RR file is kept in path-list by hanging textual 40-byte conflict signature to path of the blob that contains the conflict. The signature is strdup'ed twice, and the second copy is given to the path-list, leaking the first copy. Signed-off-by: Junio C Hamano <junio@pobox.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Diffstat (limited to 'builtin-rerere.c')
-rw-r--r--builtin-rerere.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 5c811423cc..85222d9bc5 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -43,7 +43,7 @@ static void read_rr(struct path_list *rr)
; /* do nothing */
if (i == sizeof(buf))
die("filename too long");
- path_list_insert(buf, rr)->util = xstrdup(name);
+ path_list_insert(buf, rr)->util = name;
}
fclose(in);
}