Skip to content

Commit 298f4d4

Browse files
committed
Fix CID 438800: Code maintainability issues
The annotate size should equal to metadata size (size of umf_ba_chunk_t), not pointer size.
1 parent cfd1a2a commit 298f4d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base_alloc/base_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void *umf_ba_alloc(umf_ba_pool_t *pool) {
216216

217217
// mark the memory defined to read the next ptr, after this is done
218218
// we'll mark the memory as undefined
219-
utils_annotate_memory_defined(chunk, sizeof(chunk));
219+
utils_annotate_memory_defined(chunk, sizeof(*chunk));
220220

221221
pool->metadata.free_list = pool->metadata.free_list->next;
222222
pool->metadata.n_allocs++;

0 commit comments

Comments
 (0)