| 7163 | } |
| 7164 | |
| 7165 | void diff_free(struct diff_options *options) |
| 7166 | { |
| 7167 | if (options->no_free) |
| 7168 | return; |
| 7169 | |
| 7170 | if (options->objfind) { |
| 7171 | oidset_clear(options->objfind); |
| 7172 | FREE_AND_NULL(options->objfind); |
| 7173 | } |
| 7174 | |
| 7175 | FREE_AND_NULL(options->orderfile); |
| 7176 | for (size_t i = 0; i < options->anchors_nr; i++) |
| 7177 | free(options->anchors[i]); |
| 7178 | FREE_AND_NULL(options->anchors); |
| 7179 | options->anchors_nr = options->anchors_alloc = 0; |
| 7180 | |
| 7181 | diff_free_file(options); |
| 7182 | diff_free_ignore_regex(options); |
| 7183 | clear_pathspec(&options->pathspec); |
| 7184 | } |
| 7185 | |
| 7186 | void diff_flush(struct diff_options *options) |
| 7187 | { |
no test coverage detected