mappostgis.c change

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Mar 8 14:50:53 EST 2005

Sorry about the leak. I have updated the source code to free the memory.

The reason of the changes are described in Frank's e-mail. I was not
able to build mapserver on windows so I needed to do changes. Opening a
bug in this case and wating for a discussing on it is in my opinion too
much overhead. I did inform though Paul Ramsey about the changes I did.

Best Regards,

Frank Warmerdam wrote:
> On Tue, 8 Mar 2005 10:25:34 -0800, Jerry Pisk <jerry.pisk at> 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
> light and sound - activate the windows |
> and watch the world go round - Rush    | Geospatial Programmer for Rent

Assefa Yewondwossen
Software Analyst

Email: assefa at

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925

More information about the mapserver-dev mailing list