From 0a0553b92d07e51d849f0fb7f525c6b638316551 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Sat, 31 Oct 2009 15:16:44 +0000
Subject: [PATCH] More rewrites

---
 mailid.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mailid.php b/mailid.php
index dcd0208ad0..58142edba2 100644
--- a/mailid.php
+++ b/mailid.php
@@ -89,10 +89,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
 
 	if (SQL_NUMROWS($result_link) == 1) {
 		// Load the entry
-		list($ltype) = SQL_FETCHROW($result);
-
-		// Clean result
-		SQL_FREERESULT($result);
+		list($ltype) = SQL_FETCHROW($result_link);
 
 		// @TODO Rewrite this to a filter
 		switch ($ltype) {
@@ -207,6 +204,9 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
 		SQL_FREERESULT($result);
 		$errorCode = getCode('ALREADY_CONFIRMED');
 	}
+
+	// Free result
+	SQL_FREERESULT($result_link);
 } else {
 	// Nothing entered
 	$errorCode = getCode('ERROR_MAILID');
-- 
2.39.5