From 4bf11b6a707a7dd4d1ce386c8c7cb486ee8f781e Mon Sep 17 00:00:00 2001 From: Mazet Laurent Date: Tue, 8 Apr 2025 02:46:25 +0200 Subject: [PATCH] clean close message --- morep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/morep.c b/morep.c index b154deb..eb7b1ac 100644 --- a/morep.c +++ b/morep.c @@ -100,9 +100,10 @@ void free_all_moreps (void) int i; for (i = 0; i < MAX_MOREP_NUMBER; i++) { - MOREP_Close (i); - if (MOREP_list[i]) { + if (MOREP_list[i]->used) { + MOREP_Close (i); + } free (MOREP_list[i]->tx_buffer); free (MOREP_list[i]->rx_buffer); } -- 2.30.2