[PATCH] diff: consolidate test helper script pieces.
[gitweb.git] / fsck-cache.c
index 6ac122b71cf9a5eec298a003032c5724d47f306d..4050c17eb020e0a916b23dbb610965cfcd5c7658 100644 (file)
@@ -203,6 +203,8 @@ static int fsck_tree(struct tree *item)
 
 static int fsck_commit(struct commit *commit)
 {
+       free(commit->buffer);
+       commit->buffer = NULL;
        if (!commit->tree)
                return -1;
        if (!commit->parents && show_root)