Skip to content

Commit ad7b9e8

Browse files
committed
Fix memory leaks caused by not freeing emblem_data when removing one guild from dbmap
1 parent 38537aa commit ad7b9e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/char/int_guild.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ static int inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data)
8989
// Nothing to save, guild is ready for removal.
9090
if (chr->show_save_log)
9191
ShowInfo("Guild Unloaded (%d - %s)\n", g->guild_id, g->name);
92+
aFree(g->emblem_data);
9293
db_remove(inter_guild->guild_db, key);
9394
}
9495
}
@@ -1207,6 +1208,7 @@ static bool inter_guild_disband(int guild_id)
12071208
inter->log("guild %s (id=%d) broken\n", g->name, guild_id);
12081209

12091210
//Remove the guild from memory. [Skotlex]
1211+
aFree(g->emblem_data);
12101212
idb_remove(inter_guild->guild_db, guild_id);
12111213

12121214
return true;

0 commit comments

Comments
 (0)