zlogger: add a missing mutex unlock 32/287132/1 accepted/tizen/unified/20230125.175711
authorMateusz Majewski <m.majewski2@samsung.com>
Fri, 20 Jan 2023 10:08:10 +0000 (11:08 +0100)
committerMateusz Majewski <m.majewski2@samsung.com>
Fri, 20 Jan 2023 10:08:10 +0000 (11:08 +0100)
Change-Id: I1bfc06aed2d17218ecdbbaf6e8d09b87220160cb

kernel/zlogger/zlogger.c

index e0df44e..599d1b1 100644 (file)
@@ -326,8 +326,10 @@ static struct thread_table_field *alloc_block_for_thread(bool is_stdout)
                return NULL;
        }
        ptr = set_thread_table(tid, is_stdout, blk);
-       if (!ptr)
+       if (!ptr) {
+               mutex_unlock(&g_block_mutex);
                return NULL;
+       }
        block = get_block(blk);
 
        /* security: ensure mmaped block doesn't leak any information */