summaryrefslogtreecommitdiff
path: root/services/userservice.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-09-29 06:50:23 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-09-29 06:50:23 +0000
commit063403b58d50cbad9cf4b3e1cf161c9443924e5a (patch)
tree76c3348caba665e2ef16ac366ea91db5a0a340db /services/userservice.php
parent5b88a41dd6b04cbf223f2cf272b0bbb70b6e8d9c (diff)
downloadsemanticscuttle-063403b58d50cbad9cf4b3e1cf161c9443924e5a.tar.gz
semanticscuttle-063403b58d50cbad9cf4b3e1cf161c9443924e5a.tar.bz2
fix unfreed result on watchlist page
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@378 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/userservice.php')
-rw-r--r--services/userservice.php12
1 files changed, 8 insertions, 4 deletions
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;
}