From 61fae990f2bedc0839d514c1d8e7feff775004f3 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 29 Mar 2022 22:30:01 -0500 Subject: [PATCH] Update: Deallocate before releasing signals. This helps ensure that signals, if being controlled, are properly deallocated before allowing any signals free range. --- level_3/iki_read/c/main.c | 4 ++-- level_3/iki_write/c/main.c | 4 ++-- level_3/status_code/c/main.c | 4 ++-- level_3/utf8/c/main.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/level_3/iki_read/c/main.c b/level_3/iki_read/c/main.c index 5d3af57..9ed1acf 100644 --- a/level_3/iki_read/c/main.c +++ b/level_3/iki_read/c/main.c @@ -17,10 +17,10 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { const f_status_t status = iki_read_main(&data, &arguments); - fll_program_standard_setdown(&data.signal); - fll_program_data_delete(&data); + fll_program_standard_setdown(&data.signal); + if (F_status_is_error(status)) return 1; return 0; diff --git a/level_3/iki_write/c/main.c b/level_3/iki_write/c/main.c index 4bbf3f1..b35e86c 100644 --- a/level_3/iki_write/c/main.c +++ b/level_3/iki_write/c/main.c @@ -17,10 +17,10 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { const f_status_t status = iki_write_main(&data, &arguments); - fll_program_standard_setdown(&data.signal); - fll_program_data_delete(&data); + fll_program_standard_setdown(&data.signal); + if (F_status_is_error(status)) return 1; return 0; diff --git a/level_3/status_code/c/main.c b/level_3/status_code/c/main.c index 38bddf5..6fd7860 100644 --- a/level_3/status_code/c/main.c +++ b/level_3/status_code/c/main.c @@ -17,10 +17,10 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { const f_status_t status = status_code_main(&data, &arguments); - fll_program_standard_setdown(&data.signal); - fll_program_data_delete(&data); + fll_program_standard_setdown(&data.signal); + if (F_status_is_error(status)) return 1; return 0; diff --git a/level_3/utf8/c/main.c b/level_3/utf8/c/main.c index cacae5f..0dc25a5 100644 --- a/level_3/utf8/c/main.c +++ b/level_3/utf8/c/main.c @@ -17,10 +17,10 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { const f_status_t status = utf8_main(&data, &arguments); - fll_program_standard_setdown(&data.signal); - fll_program_data_delete(&data); + fll_program_standard_setdown(&data.signal); + if (F_status_is_error(status)) return 1; return 0; -- 1.8.3.1