mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 23:08:03 +03:00
Fix: leak memory from unregister_forward (#388)
This commit is contained in:
parent
e95099817b
commit
4c8ef63383
@ -848,6 +848,7 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params)
|
|||||||
if (peng->at(i) == func_id)
|
if (peng->at(i) == func_id)
|
||||||
{
|
{
|
||||||
peng->remove(i);
|
peng->remove(i);
|
||||||
|
MF_UnregisterSPForward(func_id);
|
||||||
if (!peng->length() && patchAddr != NULL && func != FM_ServerDeactivate)
|
if (!peng->length() && patchAddr != NULL && func != FM_ServerDeactivate)
|
||||||
{
|
{
|
||||||
/* Clear out this forward if we no longer need it */
|
/* Clear out this forward if we no longer need it */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user