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

Commit 617590e

Browse files
committed
Fix handle leak from incorrect ownership
Forgot to set handle ownership on LevelEntityKeyValues returned by LevelEntityList.Get(). Any attempts to free the handle from another plugin would fail silently.
1 parent ecad327 commit 617590e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripting/level_keyvalues.sp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#pragma newdecls required
1919

20-
#define PLUGIN_VERSION "0.3.0"
20+
#define PLUGIN_VERSION "0.3.1"
2121
public Plugin myinfo = {
2222
name = "Level KeyValues",
2323
author = "nosoop",
@@ -109,7 +109,7 @@ public int Native_GetKeysByHammerID(Handle plugin, int argc) {
109109
}
110110

111111
public int Native_LevelListGet(Handle plugin, int argc) {
112-
return view_as<int>(CloneHandle(g_MapEntities.Get(GetNativeCell(1))));
112+
return view_as<int>(CloneHandle(g_MapEntities.Get(GetNativeCell(1)), plugin));
113113
}
114114

115115
public int Native_LevelListErase(Handle plugin, int argc) {

0 commit comments

Comments
 (0)