diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 220eb9e3b0c..0899fe6d5b3 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -653,6 +653,8 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { } else { dol_print_error($db); } + + $db->free($resql); } else { $sqlforcount1 = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql1); $sqlforcount2 = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql2); @@ -666,13 +668,15 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { } else { dol_print_error($db); } + + $db->free($resql1); + $db->free($resql2); } if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } - $db->free($resql); } // Complete request and execute it with limit diff --git a/htdocs/compta/prelevement/requests.php b/htdocs/compta/prelevement/requests.php index 49fd43211d7..d447dbe9f27 100644 --- a/htdocs/compta/prelevement/requests.php +++ b/htdocs/compta/prelevement/requests.php @@ -574,7 +574,7 @@ if ($id > 0 || $ref) { print '