Commit Diff


commit - 0311546bab0880d5ba279a80dd19ccdff6291f99
commit + d3d493d784c530e35d0142f76d125108b72619bb
blob - ed6be662c4c6b69e33a58601fd7c8d7cc2eae3c9
blob + 37ac5aea53c971cc728dac25a9ad244e1801cdb5
--- got/got.c
+++ got/got.c
@@ -650,6 +650,9 @@ print_commit(struct got_commit_object *commit, struct 
 	printf("commit %s%s%s%s\n", id_str, refs_str ? " (" : "",
 	    refs_str ? refs_str : "", refs_str ? ")" : "");
 	free(id_str);
+	id_str = NULL;
+	free(refs_str);
+	refs_str = NULL;
 	printf("from: %s\n", got_object_commit_get_author(commit));
 	committer_time = got_object_commit_get_committer_time(commit);
 	datestr = get_datestr(&committer_time, datebuf);