summaryrefslogtreecommitdiff
path: root/builtin-update-index.c
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2007-09-27 12:51:18 +0200
committerJunio C Hamano <gitster@pobox.com>2007-09-29 01:40:19 -0700
commit690b61f5f13db05aa4ad0efc422bd01aef3c1367 (patch)
tree7e2dc71449cd78c32661f45462158a7233dd2938 /builtin-update-index.c
parent6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 (diff)
downloadgit-690b61f5f13db05aa4ad0efc422bd01aef3c1367.tar.gz
double free in builtin-update-index.c
path_name is either ptr that should not be freed, or a pointer to a strbuf buffer that is deallocated when exiting the loop. Don't do that ! Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-update-index.c')
-rw-r--r--builtin-update-index.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/builtin-update-index.c b/builtin-update-index.c
index c76879ed7f..e1a938d897 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -377,8 +377,6 @@ static void read_index_info(int line_termination)
die("git-update-index: unable to update %s",
path_name);
}
- if (path_name != ptr)
- free(path_name);
continue;
bad_line: