summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/midend.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/puzzles/src/midend.c')
-rw-r--r--apps/plugins/puzzles/src/midend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/src/midend.c b/apps/plugins/puzzles/src/midend.c
index 036c8569c7..a8dd179690 100644
--- a/apps/plugins/puzzles/src/midend.c
+++ b/apps/plugins/puzzles/src/midend.c
@@ -171,6 +171,8 @@ midend *midend_new(frontend *fe, const game *ourgame,
171 me->params = ourgame->default_params(); 171 me->params = ourgame->default_params();
172 me->game_id_change_notify_function = NULL; 172 me->game_id_change_notify_function = NULL;
173 me->game_id_change_notify_ctx = NULL; 173 me->game_id_change_notify_ctx = NULL;
174 me->encoded_presets = NULL;
175 me->n_encoded_presets = 0;
174 176
175 /* 177 /*
176 * Allow environment-based changing of the default settings by 178 * Allow environment-based changing of the default settings by
@@ -261,8 +263,13 @@ static void midend_free_preset_menu(midend *me, struct preset_menu *menu)
261 263
262void midend_free(midend *me) 264void midend_free(midend *me)
263{ 265{
266 int i;
267
264 midend_free_game(me); 268 midend_free_game(me);
265 269
270 for (i = 0; i < me->n_encoded_presets; i++)
271 sfree(me->encoded_presets[i]);
272 sfree(me->encoded_presets);
266 if (me->drawing) 273 if (me->drawing)
267 drawing_free(me->drawing); 274 drawing_free(me->drawing);
268 random_free(me->random); 275 random_free(me->random);