grep.c: remove implicit dependency on the_index
[gitweb.git] / tree-diff.c
index fe2e466ac1dcb164b214ce4856ed9d62884ddbd3..553bc0e63ae37ada1c3e19ae748d1228561f00f6 100644 (file)
@@ -557,9 +557,7 @@ struct combine_diff_path *diff_tree_paths(
         * free pre-allocated last element, if any
         * (see path_appendnew() for details about why)
         */
-       if (p->next) {
-               FREE_AND_NULL(p->next);
-       }
+       FREE_AND_NULL(p->next);
 
        return p;
 }