Commit Diff
--- lib/diff_patience.c +++ lib/diff_patience.c @@ -363,6 +363,8 @@ diff_algo_patience(const struct diff_algo_config *algo atom_pointers = recallocarray(NULL, 0, unique_in_both_count * 2, sizeof(struct diff_atom*)); + if (atom_pointers == NULL) + return ENOMEM; /* Half for the list of atoms that still need to be put on * stacks */ struct diff_atom **uniques = atom_pointers;