Skip to Content.
Sympa Menu

freetds - Re: [freetds] Possible free(NULL) in tsql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Possible free(NULL) in tsql
  • Date: Tue, 16 Oct 2007 15:24:27 +0200

>
> James K. Lowden wrote:
> > ZIGLIO, Frediano, VF-IT wrote:
> >> if continue at line 711 is hit s2 == NULL and a free(s2)
> (line 690) is
> >> executed. This can cause a core in some system.
> >
> > Hi Freddy,
> >
> > Well, I think that's a rumor, because I'm pretty sure we
> expect free(NULL)
> > to work elsewhere in the code.
>
> ANSI C requires it to work. If it causes a core dump, then
> the system
> is broken by any reasonable definition. See ISO/IEC
> 9899:1990 7.10.3.2
> and then file a bug report with your vendor...
>

Seems fantastic. There are a lot of places where we test to avoid
free(NULL) !!!

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page