Fix: leak memory from unregister_forward (#388)
This commit is contained in:
@ -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 */
|
||||||
|
Reference in New Issue
Block a user