Re: [HACKERS] 6.1 progress - Mailing list pgsql-hackers

From Igor
Subject Re: [HACKERS] 6.1 progress
Date
Msg-id f9ca9a2fca1a6cddce9d92712253b5e8
Whole thread Raw
In response to [HACKERS] 6.1 progress  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Actually, there was a free statement ..... in the wrong place...It was
useless there. But this problem is exactly what I am talking about ...
reading these lines....

I have tested pretty much everything in psql so far after fixing this bug,
and there hasn't been either a memory leak or some memory violation...
I'll probably run regression tests tomorrow, then post the patch...

There was also another small bug where the line was
1. Under one condition it was simply set to point to something that
   was staticly allocated, so freeing is not allowed.
2. If above condition fails, it will be malloc'ed... Of course
   there was no free there, and it leaked the whole 10 bytes...:(


>     line = malloc();
>     fgets(line);
>
>     But never did a free(line); after we were finished with the
> data in line, just assigning a new memory segment to it...
>
> Marc G. Fournier
> Systems Administrator @ hub.org
> primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org
>

------------------------------

pgsql-hackers by date:

Previous
From: Massimo Dal Zotto
Date:
Subject: [HACKERS] trace package (for 970601)
Next
From: Igor
Date:
Subject: Re: [HACKERS] 6.1 progress