diff --git a/esp32/include/communication/comm_base.hpp b/esp32/include/communication/comm_base.hpp index 88af78a..fc5bfa7 100644 --- a/esp32/include/communication/comm_base.hpp +++ b/esp32/include/communication/comm_base.hpp @@ -60,7 +60,7 @@ class CommAdapterBase { sendToSubscribers(tag, buffer, stream.bytes_written); } - if (buffer != buffer) { // If we have malloced a buffer, free it now. + if (pb_heap_enc_buf != buffer) { // If we have malloced a buffer, free it now. free(buffer); } }