mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-02 21:13:40 +00:00
[CORE] Fix detection of a failed memory allocation
This commit is contained in:
committed by
Sukchan Lee
parent
ab11220dcc
commit
6adf541346
@@ -301,7 +301,7 @@ ogs_pkbuf_t *ogs_pkbuf_copy_debug(ogs_pkbuf_t *pkbuf, const char *file_line)
|
||||
|
||||
ogs_assert(size > 0);
|
||||
newbuf = ogs_pkbuf_alloc_debug(NULL, size, file_line);
|
||||
if (!pkbuf) {
|
||||
if (!newbuf) {
|
||||
ogs_error("ogs_pkbuf_alloc() failed [size=%d]", size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user