Browse Source

- Fixed my fix on multi-map leak thanks to Buuyo^.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5865 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lance 19 years ago
parent
commit
863806c1e4
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/map/map.c

+ 3 - 4
src/map/map.c

@@ -3588,10 +3588,9 @@ int log_sql_init(void){
 
 
 int map_db_final(DBKey k,void *d,va_list ap)
 int map_db_final(DBKey k,void *d,va_list ap)
 {
 {
-	// Not needed actually, these are already freed. [Lance]
-	//struct map_data_other_server *mdos = (struct map_data_other_server*)d;
-	//if(mdos->gat == NULL)
-	//	aFree(mdos);
+	struct map_data_other_server *mdos = (struct map_data_other_server*)d;
+	if(mdos && mdos->gat == NULL)
+		aFree(mdos);
 	return 0;
 	return 0;
 }
 }
 int nick_db_final(void *k,void *d,va_list ap)
 int nick_db_final(void *k,void *d,va_list ap)