mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:04:47 +02:00
Fix a memory leak in os_akill and os_sxline.
This commit is contained in:
@@ -188,7 +188,10 @@ private:
|
||||
}
|
||||
|
||||
if (!akills->CanAdd(source, mask, expires, reason))
|
||||
{
|
||||
delete x;
|
||||
return;
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, akills));
|
||||
|
||||
@@ -389,7 +389,10 @@ class CommandOSSNLine final
|
||||
}
|
||||
|
||||
if (!this->xlm()->CanAdd(source, mask, expires, reason))
|
||||
{
|
||||
delete x;
|
||||
return;
|
||||
}
|
||||
|
||||
EventReturn MOD_RESULT;
|
||||
FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, this->xlm()));
|
||||
|
||||
Reference in New Issue
Block a user