selection: modify: no need to check for NULL before calling free()

This commit is contained in:
Daniel Eklöf 2021-08-14 10:50:49 +02:00
parent 02fbd0bbce
commit 636fea55f5
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -574,11 +574,8 @@ selection_modify(struct terminal *term, struct coord start, struct coord end)
foreach_selected(term, start, end, &mark_selected, &ctx);
render_refresh(term);
for (size_t i = 0; i < term->grid->num_rows; i++) {
if (keep_selection[i] == NULL)
continue;
for (size_t i = 0; i < term->grid->num_rows; i++)
free(keep_selection[i]);
}
free(keep_selection);
}