1. ibt lists
diff -u --new-file --recursive tbamud-3.61_stock/src/comm.c tbamud-3.61/src/comm.c
--- tbamud-3.61_stock/src/comm.c 2010-01-26 17:42:22.000000000 -0600
+++ tbamud-3.61/src/comm.c 2010-06-19 00:20:16.000000000 -0500
@@ -80,6 +80,7 @@
#include "spells.h" /* for affect_update */
#include "modify.h"
#include "quest.h"
+#include "ibt.h" /* for free_ibt_lists */
#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
@@ -365,6 +366,7 @@
free_invalid_list(); /* ban.c */
free_save_list(); /* genolc.c */
free_strings(&config_info, OASIS_CFG); /* oasis_delete.c */
+ free_ibt_lists(); /* ibt.c */
}
if (last_act_message)
diff -u --new-file --recursive tbamud-3.61_stock/src/ibt.c tbamud-3.61/src/ibt.c
--- tbamud-3.61_stock/src/ibt.c 2010-01-26 17:42:22.000000000 -0600
+++ tbamud-3.61/src/ibt.c 2010-06-19 00:22:30.000000000 -0500
@@ -1019,3 +1019,16 @@
break;
}
}
+
+/*-------------------------------------------------------------------*/
+void free_ibt_lists()
+{
+ IBT_DATA *first_ibt, *last_ibt;
+ int mode;
+
+ for( mode=0; mode <=2; mode++){
+ first_ibt = get_first_ibt(mode);
+ last_ibt = get_last_ibt(mode);
+ free_ibt_list(first_ibt, last_ibt);
+ }
+}
diff -u --new-file --recursive tbamud-3.61_stock/src/ibt.h tbamud-3.61/src/ibt.h
--- tbamud-3.61_stock/src/ibt.h 2010-01-26 17:42:22.000000000 -0600
+++ tbamud-3.61/src/ibt.h 2010-06-19 00:19:51.000000000 -0500
@@ -96,4 +96,4 @@
void load_ibt_file(int mode);
void ibtedit_parse(struct descriptor_data *d, char *arg);
void ibtedit_string_cleanup(struct descriptor_data *d, int terminator);
-
+void free_ibt_lists();
2. help_table struct
diff -u --new-file --recursive tbamud-3.61_stock/src/db.c tbamud-3.61/src/db.c
--- tbamud-3.61_stock/src/db.c 2010-01-26 17:42:21.000000000 -0600
+++ tbamud-3.61/src/db.c 2010-06-19 01:44:17.000000000 -0500
@@ -2167,7 +2167,7 @@
{
if (help_table) {
int hp;
- for (hp = 0; hp < top_of_helpt; hp++) {
+ for (hp = 0; hp <= top_of_helpt; hp++) {
if (help_table[hp].keywords)
free(help_table[hp].keywords);
if (help_table[hp].entry && !help_table[hp].duplicate)
Before:
zmalloc: 11 leaks totalling 161 bytes... close, but not there yet.
After:
zmalloc: Congratulations: leak-free code!




