rev-list: check reflog_info before showing usage
[gitweb.git] / builtin / log.c
index cf303b2c06d24778d70b65427db1e23b5dfd9dcf..630d6cff2ff969c280fd0f06f17ce7a960901008 100644 (file)
@@ -377,9 +377,9 @@ static int cmd_log_walk(struct rev_info *rev)
                         * walking the reflogs.
                         */
                        free_commit_buffer(commit);
+                       free_commit_list(commit->parents);
+                       commit->parents = NULL;
                }
-               free_commit_list(commit->parents);
-               commit->parents = NULL;
                if (saved_nrl < rev->diffopt.needed_rename_limit)
                        saved_nrl = rev->diffopt.needed_rename_limit;
                if (rev->diffopt.degraded_cc_to_c)