Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line' into maint
[gitweb.git] / diff-lib.c
index 2a52b079546cb01d8dfe708f7e7c7e38ec582435..4e0980caa80fb980938f68c8d350ec00cc24398b 100644 (file)
@@ -549,7 +549,6 @@ int index_differs_from(const char *def, int diff_flags,
        rev.diffopt.flags |= diff_flags;
        rev.diffopt.ita_invisible_in_index = ita_invisible_in_index;
        run_diff_index(&rev, 1);
-       if (rev.pending.alloc)
-               free(rev.pending.objects);
+       object_array_clear(&rev.pending);
        return (DIFF_OPT_TST(&rev.diffopt, HAS_CHANGES) != 0);
 }