Skip to content

Commit cba0326

Browse files
committed
Add missing unlock in an error handling path of umf_ba_alloc()
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent d2ddb6e commit cba0326

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/base_alloc/base_alloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 Intel Corporation
2+
* Copyright (C) 2024-2025 Intel Corporation
33
*
44
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
55
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -230,6 +230,7 @@ void *umf_ba_alloc(umf_ba_pool_t *pool) {
230230
// check if the free list is not empty
231231
if (pool->metadata.free_list == NULL) {
232232
LOG_ERR("base_alloc: Free list should not be empty before new alloc");
233+
utils_mutex_unlock(&pool->metadata.free_lock);
233234
return NULL;
234235
}
235236

0 commit comments

Comments
 (0)