mirror of
https://gitee.com/moluo-tech/AT-Command.git
synced 2025-02-05 17:28:23 +08:00
Fixed the issue where the pointer was not checked to be empty after the creation of urcbuf.
This commit is contained in:
parent
a6aa614088
commit
79803ddc3c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user