2
0
mirror of https://github.com/alliedmodders/amxmodx.git synced 2025-06-26 12:39:35 +03:00

Fix: leak memory from unregister_forward ()

This commit is contained in:
s1lentq 2016-10-12 21:26:21 +00:00 committed by Vincent Herbet
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 */