summaryrefslogtreecommitdiffstats
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-09-19 10:37:50 +0200
committerJunio C Hamano <gitster@pobox.com>2007-09-19 10:54:24 +0200
commitca0328354afbf4ec6941cb4312bfc6908ab06d73 (patch)
tree5ed8e1d5439b63551693fba5c279010ad44084ad /builtin-apply.c
parentUse xmemdupz() in many places. (diff)
downloadgit-ca0328354afbf4ec6941cb4312bfc6908ab06d73.tar.xz
git-ca0328354afbf4ec6941cb4312bfc6908ab06d73.zip
builtin-apply.c: fix a tiny leak introduced during xmemdupz() conversion.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 512c9b6142..db337f1aca 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -291,6 +291,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
int deflen = strlen(def);
if (deflen < len && !strncmp(start, def, deflen))
return def;
+ free(def);
}
return xmemdupz(start, len);