]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
fix unfreed result on watchlist page
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 29 Sep 2009 06:50:23 +0000 (06:50 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 29 Sep 2009 06:50:23 +0000 (06:50 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@378 b3834d28-1941-0410-a4f8-b48e95affb8f

services/userservice.php

index a24c7ba2ef1d586f802ced78da318d743a5af882..407632b24ea4bd74e96d64267aed1a3e72bbca40 100644 (file)
@@ -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;
        }