diff --git a/mod/chat/lib.php b/mod/chat/lib.php index c8f68fc7238..da204e6d5e3 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -365,6 +365,8 @@ function chat_get_latest_message($chatid, $groupid=0) { } $result = rs_fetch_record($rs); + + rs_close($rs); return $result; }