From 636fea55f507675cb494f85c260ae6eac125827c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 14 Aug 2021 10:50:49 +0200 Subject: [PATCH] selection: modify: no need to check for NULL before calling free() --- selection.c | 5 +---- 1 file changed, 1 insertion(+), 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); }