From 063403b58d50cbad9cf4b3e1cf161c9443924e5a Mon Sep 17 00:00:00 2001 From: cweiske Date: Tue, 29 Sep 2009 06:50:23 +0000 Subject: fix unfreed result on watchlist page git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@378 b3834d28-1941-0410-a4f8-b48e95affb8f --- services/userservice.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'services/userservice.php') diff --git a/services/userservice.php b/services/userservice.php index a24c7ba..407632b 100644 --- a/services/userservice.php +++ b/services/userservice.php @@ -303,10 +303,14 @@ class UserService { } $arrWatch = array(); - if ($this->db->sql_numrows($dbresult) == 0) - return $arrWatch; - while ($row =& $this->db->sql_fetchrow($dbresult)) - $arrWatch[] = $row['watched']; + if ($this->db->sql_numrows($dbresult) == 0) { + $this->db->sql_freeresult($dbresult); + return $arrWatch; + } + while ($row =& $this->db->sql_fetchrow($dbresult)) { + $arrWatch[] = $row['watched']; + } + $this->db->sql_freeresult($dbresult); return $arrWatch; } -- cgit v1.2.3-54-g00ecf