mappostgis.c change
Frank Warmerdam
fwarmerdam at GMAIL.COM
Tue Mar 8 13:37:09 EST 2005
On Tue, 8 Mar 2005 10:25:34 -0800, Jerry Pisk <jerry.pisk at gmail.com> wrote:
> I was just wondering if I can back out the latest mappostgis.c change,
> it only introduced a memory leak as far as I can see it. It allocates
> memory with malloc and never releases it. It would be nice if the
> author included information on why he did the change and created a bug
> report to discuss the issue, is that something that can be done?
Jerry,
Do you mean:
* Revision 1.50 2005/03/07 14:55:37 assefa
* Correct problems when building on Windows.
The correction seems to relate removing Paul's use of:
char tmp2[strlen(tmp1) + strlen(sql)];
Despite it's convenience, I don't believe this is portable C++
(much less portable C). Assefa removed it and replaced it with dynamic
memory allocation.
Looking at the change, you are right that it seems the new allocation
is leaked. I would encourage you to create a bug report for this and
assign it to Assefa (or Paul, or fix it yourself). Well, if you fix it yourself
a bug report would likely not been required.
I don't see any need for Assefa to file a bug report over a relatively
simple fix for portability when he is going to take care of it himself
right away. His CVS commit comment could have been slightly more
meaningful, but honestly it was a small change and he did explain why
it was being done.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the mapserver-dev
mailing list