From 9eef103e7578c93490841696fcd428fc8f89e273 Mon Sep 17 00:00:00 2001 From: lavigor Date: Wed, 6 Jun 2018 20:02:04 +0300 Subject: [PATCH] [ticket/13713] Free SQL results PHPBB3-13713 --- phpBB/phpbb/mention/source/group.php | 4 ++++ phpBB/phpbb/mention/source/user.php | 2 ++ phpBB/phpbb/textformatter/s9e/mention_helper.php | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/phpBB/phpbb/mention/source/group.php b/phpBB/phpbb/mention/source/group.php index cf725789c1..92619ee772 100644 --- a/phpBB/phpbb/mention/source/group.php +++ b/phpBB/phpbb/mention/source/group.php @@ -70,6 +70,8 @@ abstract class group implements source_interface $groups[$row['group_id']] = $row; $groups[$row['group_id']]['group_name'] = $group_name; } + + $this->db->sql_freeresult($result); } return $groups; } @@ -97,6 +99,8 @@ abstract class group implements source_interface $group_ids[] = $row['group_id']; } + $this->db->sql_freeresult($result); + // Grab group data $groups = $this->get_groups(); diff --git a/phpBB/phpbb/mention/source/user.php b/phpBB/phpbb/mention/source/user.php index d691634859..466bda36db 100644 --- a/phpBB/phpbb/mention/source/user.php +++ b/phpBB/phpbb/mention/source/user.php @@ -76,6 +76,8 @@ abstract class user implements source_interface ]; } + $this->db->sql_freeresult($result); + return $names; } } diff --git a/phpBB/phpbb/textformatter/s9e/mention_helper.php b/phpBB/phpbb/textformatter/s9e/mention_helper.php index 91530d5c5c..b383dc46f7 100644 --- a/phpBB/phpbb/textformatter/s9e/mention_helper.php +++ b/phpBB/phpbb/textformatter/s9e/mention_helper.php @@ -80,6 +80,8 @@ class mention_helper { $this->cached_colors['users'][$row['user_id']] = $row['user_colour']; } + + $this->db->sql_freeresult($result); } if (!empty($group_ids)) @@ -97,6 +99,8 @@ class mention_helper { $this->cached_colors['groups'][$row['group_id']] = $row['group_colour']; } + + $this->db->sql_freeresult($result); } }