Commit b124e39f authored by Carles Cufi's avatar Carles Cufi Committed by Fabio Utzig
Browse files

zephyr: serial_adapter: Fix allocation of buffers

In order to avoid overwriting an existing allocated buffer that has not
yet been processed by the main loop, switch to a new command buffer
whenever we have received a complete one.

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent b88b2c45
Loading
Loading
Loading
Loading
+1
Changes for boot/zephyr/serial_adapter.c: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@ boot_uart_fifo_callback(struct device *dev)
			cmd->len = cur;
			sys_slist_append(lines_queue, &cmd->node);
			cur = 0;
			cmd = NULL;
		}
	}
}