Forráskód Böngészése

* Patch from Ludo Brands to fix memory leak (bug 22228)

git-svn-id: trunk@21540 -
michael 13 éve
szülő
commit
4b8ffef650
1 módosított fájl, 9 hozzáadás és 1 törlés
  1. 9 1
      packages/fcl-db/src/sqldb/mysql/mysqlconn.inc

+ 9 - 1
packages/fcl-db/src/sqldb/mysql/mysqlconn.inc

@@ -509,8 +509,16 @@ begin
 end;
 
 procedure TConnectionName.UnPrepareStatement(cursor: TSQLCursor);
+Var
+  C : TCursorName;
+
 begin
-  // do nothing
+  C:=Cursor as TCursorName;
+  if assigned(C.FRes) then  //ExecSQL with dataset returned
+    begin
+    mysql_free_result(C.FRes);
+    C.FRes:=nil;
+    end;
 end;
 
 procedure TConnectionName.FreeFldBuffers(cursor: TSQLCursor);