List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 3/3] ui-stats.c: set parent pointer to NULL after freeing it
Date: Sun, 27 Jul 2014 11:56:20 +0100	[thread overview]
Message-ID: <859620c56fafcfacce7eed37d24f169b23941396.1406458339.git.john@keeping.me.uk> (raw)
In-Reply-To: <cover.1406458339.git.john@keeping.me.uk>

We do this everywhere else, so we should be doing it here as well.

Signed-off-by: John Keeping <john at keeping.me.uk>
---
 ui-stats.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui-stats.c b/ui-stats.c
index 6f13c32..a264f6a 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -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;
 }
-- 
2.0.1.472.g6f92e5f.dirty



  parent reply	other threads:[~2014-07-27 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-27 10:56 [PATCH 0/3] Update to Git 2.0.3 john
2014-07-27 10:56 ` [PATCH 1/3] parsing.c: make commit buffer const john
2014-07-27 10:56 ` [PATCH 2/3] git: update to v2.0.3 john
2014-07-27 10:56 ` john [this message]
2014-07-27 23:59 ` [PATCH 0/3] Update to Git 2.0.3 Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=859620c56fafcfacce7eed37d24f169b23941396.1406458339.git.john@keeping.me.uk \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).