Skip to content

Commit de9fc40

Browse files
i3abghanystsquad
authored andcommitted
plugins/cache: Fixed a bug with destroying FIFO metadata
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Message-Id: <[email protected]> Message-Id: <[email protected]>
1 parent f7e68c9 commit de9fc40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/plugins/cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static void fifo_destroy(Cache *cache)
200200
{
201201
int i;
202202

203-
for (i = 0; i < cache->assoc; i++) {
203+
for (i = 0; i < cache->num_sets; i++) {
204204
g_queue_free(cache->sets[i].fifo_queue);
205205
}
206206
}

0 commit comments

Comments
 (0)