sources/thread_global.c: add missing checks on malloc failure (#493)

This commit is contained in:
Ilya Shipitsin 2023-05-19 11:36:16 +02:00 committed by GitHub
parent 9603896a7b
commit e9288b971d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,9 @@
od_retcode_t od_thread_global_init(od_thread_global **gl)
{
*gl = malloc(sizeof(od_thread_global));
if (*gl == NULL) {
return NOT_OK_RESPONSE;
}
od_conn_eject_info_init(&(*gl)->info);