Okundu Omeni / Mbed OS wifi-https-ble-sm-uart-atcmd-5-13-1

Dependencies:   mbed-http

Revision:
97:0aa46e5ef15d
Parent:
96:f5ed273881af
Child:
98:65c2333a38b6
diff -r f5ed273881af -r 0aa46e5ef15d source/ATCmdManager.cpp
--- a/source/ATCmdManager.cpp	Fri Apr 19 08:51:58 2019 +0000
+++ b/source/ATCmdManager.cpp	Fri Apr 19 10:26:58 2019 +0000
@@ -441,6 +441,8 @@
                         _smutex.lock();
                         _parser.send("ERR");
                         _smutex.unlock();
+                        free(rx_buf_ptr); // make sure to free buffer
+                        rx_buf_ptr = NULL;
                         break; // exit if stop byte not found - possible data corruption!
                     }
                     switch(edm_hdr.payloadID)