diff options
Diffstat (limited to 'src/cc4group.c')
| -rw-r--r-- | src/cc4group.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cc4group.c b/src/cc4group.c index 43a22b5..85c1be4 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -366,7 +366,14 @@ static void* cc4group_createTmpMemoryMalloc(CC4Group* const this, const size_t s // error checking is left out intentionally. it is the job of the calling function void* ret = malloc(size); - *cleanupJob = (CC4Group_CleanupJob){free, ret}; + if(ret == NULL) + { + SET_ERRNO_ERROR("malloc: allocating tmp memory"); + } + else + { + *cleanupJob = (CC4Group_CleanupJob){free, ret}; + } return ret; } |
