~mdw
/
sgt
/
puzzles
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
444203b
)
Patch from Ton van Overbeek to fix a small memory leak in
author
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Sep 2005 12:53:27 +0000
(12:53 +0000)
committer
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Sep 2005 12:53:27 +0000
(12:53 +0000)
midend_solve().
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6271
cda61777
-01e9-0310-a592-
d414129be87e
midend.c
patch
|
blob
|
blame
|
history
diff --git
a/midend.c
b/midend.c
index
6d639eb
..
1f564f3
100644
(file)
--- a/
midend.c
+++ b/
midend.c
@@
-1169,8
+1169,11
@@
char *midend_solve(midend *me)
* Now enter the solved state as the next move.
*/
midend_stop_anim(me);
- while (me->nstates > me->statepos)
+ while (me->nstates > me->statepos)
{
me->ourgame->free_game(me->states[--me->nstates].state);
+ if (me->states[me->nstates].movestr)
+ sfree(me->states[me->nstates].movestr);
+ }
ensure(me);
me->states[me->nstates].state = s;
me->states[me->nstates].movestr = movestr;