Fix: leak memory from unregister_forward (#388)

This commit is contained in:
s1lentq 2016-10-12 21:26:21 +00:00 committed by Vincent Herbet
parent e95099817b
commit 4c8ef63383

View File

@ -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 */