Code

Fix status loading of unmerged entries to avoid access to freed memory
authorJonas Fonseca <fonseca@diku.dk>
Sat, 24 Jan 2009 11:52:25 +0000 (12:52 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Sat, 24 Jan 2009 11:57:34 +0000 (12:57 +0100)
tig.c

diff --git a/tig.c b/tig.c
index 9e80d15b7fb61bd886a648f1387a0dd1828cb1ff..7380c0fd8a3b0987506732624f6cecce1317e970 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -4358,6 +4358,7 @@ status_run(struct view *view, const char *argv[], char status, enum line_type ty
                                unmerged = NULL;
                                if (collapse) {
                                        free(file);
+                                       file = NULL;
                                        view->lines--;
                                        continue;
                                }