]> granicus.if.org Git - cgit/commitdiff
ui-stats.c: set parent pointer to NULL after freeing it
authorJohn Keeping <john@keeping.me.uk>
Sun, 27 Jul 2014 10:56:20 +0000 (11:56 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 28 Jul 2014 00:01:47 +0000 (02:01 +0200)
We do this everywhere else, so we should be doing it here as well.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-stats.c

index 6f13c32e36efe2beca2e730191f738aad7bd7f11..a264f6ae468df68da389fca429fd5a1ddbdac4eb 100644 (file)
@@ -246,6 +246,7 @@ static struct string_list collect_stats(struct cgit_period *period)
                add_commit(&authors, commit, period);
                free_commit_buffer(commit);
                free_commit_list(commit->parents);
+               commit->parents = NULL;
        }
        return authors;
 }