aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-08-14 08:50:49 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-08-16 17:15:52 +0000
commit636fea55f507675cb494f85c260ae6eac125827c (patch)
tree2fdbd66a1340f052283b2856d40a669c8f56f112 /selection.c
parentselection: modify: convert ‘keep_selection’ bitmask from uint64_t to uint8_t (diff)
selection: modify: no need to check for NULL before calling free()
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/selection.c b/selection.c
index c0a48da5..b40215e6 100644
--- a/selection.c
+++ b/selection.c
@@ -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);
}