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>
Pierre Habouzit committed
Sep 27, 2007 at 12:51 UTC
690b61f5f13db05aa4ad0efc422bd01aef3c1367
1 file changed
-2
builtin-update-index.c
-2
@@ -377,8 +377,6 @@ static void read_index_info(int line_termination)
377
die("git-update-index: unable to update %s",
378
path_name);
379
}
380
- if (path_name != ptr)
381
- free(path_name);
380
continue;
381
382
bad_line: