summaryrefslogtreecommitdiff
path: root/builtin-update-index.c
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2007-09-27 10:51:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-29 08:40:19 (GMT)
commit690b61f5f13db05aa4ad0efc422bd01aef3c1367 (patch)
tree7e2dc71449cd78c32661f45462158a7233dd2938 /builtin-update-index.c
parent6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 (diff)
downloadgit-690b61f5f13db05aa4ad0efc422bd01aef3c1367.zip
git-690b61f5f13db05aa4ad0efc422bd01aef3c1367.tar.gz
git-690b61f5f13db05aa4ad0efc422bd01aef3c1367.tar.bz2
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 c76879e..e1a938d 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: