Skip to content
This repository was archived by the owner on Sep 24, 2023. It is now read-only.

Commit 5c0d491

Browse files
committed
Fix handle leak on entity list erase
Oops.
1 parent 0efc58d commit 5c0d491

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripting/level_keyvalues.sp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#pragma newdecls required
1919

20-
#define PLUGIN_VERSION "0.3.2"
20+
#define PLUGIN_VERSION "0.3.3"
2121
public Plugin myinfo = {
2222
name = "Level KeyValues",
2323
author = "nosoop",
@@ -116,6 +116,9 @@ public int Native_LevelListErase(Handle plugin, int argc) {
116116
if (!g_bMutableList) {
117117
ThrowNativeError(1, "Can't remove entities from list during non-mutable state.");
118118
}
119+
StringMultiMap entity = g_MapEntities.Get(GetNativeCell(1));
120+
delete entity;
121+
119122
g_MapEntities.Erase(GetNativeCell(1));
120123
return 0;
121124
}

0 commit comments

Comments
 (0)