From e9288b971dc550467d867c9b1b7b0e5242fd8394 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Fri, 19 May 2023 11:36:16 +0200 Subject: [PATCH] sources/thread_global.c: add missing checks on malloc failure (#493) --- sources/thread_global.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/thread_global.c b/sources/thread_global.c index f1bb14a6..35dec9ba 100644 --- a/sources/thread_global.c +++ b/sources/thread_global.c @@ -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);