summaryrefslogtreecommitdiff
path: root/channels/console_board.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/console_board.c')
-rw-r--r--channels/console_board.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/channels/console_board.c b/channels/console_board.c
index fd286f29e..e80247c5f 100644
--- a/channels/console_board.c
+++ b/channels/console_board.c
@@ -313,6 +313,23 @@ int print_message(struct board *b, const char *s)
return 1;
}
+/* deletes a board.
+ * we make the free operation on any fields of the board structure allocated
+ * in dynamic memory
+ */
+void delete_board(struct board *b)
+{
+ if (b) {
+ /* deletes the text */
+ if (b->text)
+ ast_free (b->text);
+ /* deallocates the blank surface */
+ SDL_FreeSurface(b->blank);
+ /* deallocates the board */
+ ast_free(b);
+ }
+}
+
#if 0
/*! \brief refresh the screen, and also grab a bunch of events.
*/