On Fri, Oct 24, 2008 at 08:04:24PM +0000, [EMAIL PROTECTED] wrote: > In file src/interfaces/ecpg/compatlib/informix.c:763 > > It seems to me that variable "temp" leaks memory here if initValue() fails: > > temp = (char *) malloc(fmt_len + 1); > > /* put all info about the long in a struct */ > if (!temp || initValue(lng_val) == -1) > { > errno = ENOMEM; > return -1; > }
Technically you're right and I will fix this in CVS. However, I doubt this has any impact at all because there is only one failure possible in initValue and that's ENOMEM. So an application might not free all its memory if it ever runs out of memory. But given that the latter case will probably result in the application being terminated the effect is nil for almost all use cases. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED] Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs