summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/operserv/os_akill.cpp3
-rw-r--r--modules/operserv/os_sxline.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/operserv/os_akill.cpp b/modules/operserv/os_akill.cpp
index 7fcacd9ad..26936cc2c 100644
--- a/modules/operserv/os_akill.cpp
+++ b/modules/operserv/os_akill.cpp
@@ -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));
diff --git a/modules/operserv/os_sxline.cpp b/modules/operserv/os_sxline.cpp
index 2460a5fe8..e18a21f9c 100644
--- a/modules/operserv/os_sxline.cpp
+++ b/modules/operserv/os_sxline.cpp
@@ -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()));