From 96140f9429e2c5dfece9f72ee06076cf9f1268af Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 9 Aug 2020 20:30:43 +0200 Subject: at cmd bugfix: added regfree --- fw/esp32/components/eos/at_cmd.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'fw/esp32') diff --git a/fw/esp32/components/eos/at_cmd.c b/fw/esp32/components/eos/at_cmd.c index 1f39afa..82baa92 100644 --- a/fw/esp32/components/eos/at_cmd.c +++ b/fw/esp32/components/eos/at_cmd.c @@ -95,6 +95,7 @@ int at_urc_delete(char *pattern) { for (i=0; i timeout)) return EOS_ERR_TIMEOUT; + if (timeout && (e > timeout)) { + if (str_ok) regfree(&re_ok); + if (str_err) regfree(&re_err); + return EOS_ERR_TIMEOUT; + } } while (1); } -- cgit v1.2.3