mirror of
https://gitee.com/moluo-tech/AT-Command
synced 2025-06-17 07:57:52 +00: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) {
|
if (adap->urc_bufsize != 0) {
|
||||||
ai->urc_bufsize = adap->urc_bufsize < 32 ? 32 : adap->urc_bufsize;
|
ai->urc_bufsize = adap->urc_bufsize < 32 ? 32 : adap->urc_bufsize;
|
||||||
ai->urcbuf = at_core_malloc(ai->urc_bufsize);
|
ai->urcbuf = at_core_malloc(ai->urc_bufsize);
|
||||||
if (ai->recvbuf == NULL) {
|
if (ai->urcbuf == NULL) {
|
||||||
at_obj_destroy(&ai->obj);
|
at_obj_destroy(&ai->obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user