Fixed memory leak when using loadnpc or reloadnpcfile command (#5667)
Fixes #5649
This commit is contained in:
parent
dfa1df7de6
commit
01188b1501
@ -4752,7 +4752,7 @@ ACMD_FUNC(loadnpc)
|
||||
|
||||
npc_read_event_script();
|
||||
|
||||
ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was reloaded.\n", message );
|
||||
ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was loaded.\n", message );
|
||||
npc_event_doall_path( script_config.init_event_name, message );
|
||||
|
||||
clif_displaymessage(fd, msg_txt(sd,262)); // Script loaded.
|
||||
|
@ -581,6 +581,7 @@ int npc_event_doall_path( const char* event_name, const char* path ){
|
||||
|
||||
ShowStatus( "Event '" CL_WHITE "%s" CL_RESET "' executed with '" CL_WHITE "%d" CL_RESET "' NPCs.\n", event_name, count );
|
||||
|
||||
mapit_free(iter);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user