diff options
author | Sadie Powell <sadie@witchery.services> | 2024-06-07 22:36:52 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-06-07 22:39:08 +0100 |
commit | 67b76fadca2c3af105e7aff862242971960fa5d5 (patch) | |
tree | 4789cec14328d461732efacc558c98db1142995c /modules | |
parent | 78617124374c99d6c83460393a8b4b76ce354007 (diff) |
Fix a memory leak in os_akill and os_sxline.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/operserv/os_akill.cpp | 3 | ||||
-rw-r--r-- | modules/operserv/os_sxline.cpp | 3 |
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())); |