logging/nxscope: fix invalid zalloc size for rxbuf

This commit is contained in:
raiden00pl 2023-04-21 11:51:55 +02:00 committed by Alan Carvalho de Assis
parent ceba53402e
commit a906a76734

View File

@ -809,7 +809,7 @@ int nxscope_init(FAR struct nxscope_s *s, FAR struct nxscope_cfg_s *cfg)
DEBUGASSERT(cfg->rxbuf_len > 0);
s->rxbuf_len = cfg->rxbuf_len;
s->rxbuf = zalloc(s->chinfo_size);
s->rxbuf = zalloc(s->rxbuf_len);
if (s->rxbuf == NULL)
{
ret = -errno;