Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 14, 2016, 13:38   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
Memory leak in object_find_unknown_rune()

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;
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old June 14, 2016, 14:06   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,841
Donated: $60
Nick will become famous soon enough
Nice work as usual
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monster memory from 3.5.0 Gobbopathe Vanilla 3 September 19, 2015 10:34
The Monster Memory Oramin Vanilla 152 August 18, 2013 12:09
Monster Memory, take 2? buzzkill Idle chatter 1 September 8, 2012 07:32
Exploitable information leak? kaypy Vanilla 33 May 29, 2011 03:28
Artifact memory? Mondkalb Vanilla 5 May 2, 2007 23:02


All times are GMT +1. The time now is 07:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.