From: Kevin Day Date: Wed, 30 Mar 2022 03:30:01 +0000 (-0500) Subject: Update: Deallocate before releasing signals. X-Git-Tag: 0.5.9~45 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=61fae990f2bedc0839d514c1d8e7feff775004f3;p=fll Update: Deallocate before releasing signals. This helps ensure that signals, if being controlled, are properly deallocated before allowing any signals free range. --- 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;