[CORE] Fix detection of a failed memory allocation

This commit is contained in:
Bostjan Meglic 2022-06-29 12:58:05 +00:00 committed by Sukchan Lee
parent ab11220dcc
commit 6adf541346
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}