poss_runes is allocated but not freed in object_find_unknown_rune():
Code:
int *poss_runes = mem_zalloc(rune_max * sizeof(int)); if (object_runes_known(obj)) return -1; for (i = 0; i < rune_max; i++) if (object_has_rune(obj, i) && !player_knows_rune(p, i)) poss_runes[num++] = i; /* Grab a random rune from among the unknowns */ if (num) return poss_runes[randint0(num)]; return -1;
Comment