Skip to content

Commit 5fefad3

Browse files
authored
Merge pull request #1181 from bratpiorka/rrudnick_dp_coverity_fix
fix for potential out-of-bounds read in tracker
2 parents 7727ad1 + eec4f13 commit 5fefad3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/provider/provider_tracking.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,9 +1236,9 @@ umf_memory_tracker_handle_t umfMemoryTrackerCreate(void) {
12361236
err_destroy_ipc_info_allocator:
12371237
umf_ba_destroy(handle->ipc_info_allocator);
12381238
err_destroy_alloc_segments_map:
1239-
for (int j = i; j >= 0; j--) {
1240-
if (handle->alloc_segments_map[j]) {
1241-
critnib_delete(handle->alloc_segments_map[j]);
1239+
for (i = 0; i < MAX_LEVELS_OF_ALLOC_SEGMENT_MAP; i++) {
1240+
if (handle->alloc_segments_map[i]) {
1241+
critnib_delete(handle->alloc_segments_map[i]);
12421242
}
12431243
}
12441244
utils_mutex_destroy_not_free(&handle->splitMergeMutex);

0 commit comments

Comments
 (0)