stm32/main: use free for custom command
With normal programs, mp_reader_new_mem automatically frees the buffer for us. For custom fake programs like the REPL command, we need to do this ourselves because we treat it just like a program for now.
@@ -234,6 +234,7 @@ static void run_user_program(uint32_t len, uint8_t *buf) {
#if MICROPY_ENABLE_COMPILER
if (len == 4 && !strcmp((char *) buf, "REPL")) {
+ m_free(buf);
pyexec_friendly_repl();
return;
}
