Direct SQL - Delphi News
Brought to you by:
whity
02/03/2003 - before strdispose(pac) in line 689 there should be a:
if pac<>packet1 then
In the unit uMysqlNet in the implementation of
function TMysqlNet.net_real_write there is a possible memory leak. The fix is:
lines 638 and 639
pac:=stralloc(len1); //get some memory ???
move(packet1[0],pac^,len1);
should be replaced by:
pac:=packet1;
Line 667
len1:=len1+ header_length;
strdispose(pac);
pac:=b;
should be removed as:
len1:=len1+ header_length;
pac:=b;
This would save an allocation + a move and fix a possible leak when not using compressed protocol.
Cristian