Fixed the issue where the pointer was not checked to be empty after the creation of urcbuf.

This commit is contained in:
roger.luo 2023-11-24 21:43:37 +08:00
parent a6aa614088
commit 79803ddc3c

View File

@ -851,7 +851,7 @@ at_obj_t *at_obj_create(const at_adapter_t *adap)
if (adap->urc_bufsize != 0) {
ai->urc_bufsize = adap->urc_bufsize < 32 ? 32 : adap->urc_bufsize;
ai->urcbuf = at_core_malloc(ai->urc_bufsize);
if (ai->recvbuf == NULL) {
if (ai->urcbuf == NULL) {
at_obj_destroy(&ai->obj);
return NULL;
}