Re: pg_ctl infinite loop and memory leak - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_ctl infinite loop and memory leak
Date
Msg-id 22766.1251856891@sss.pgh.pa.us
Whole thread Raw
In response to pg_ctl infinite loop and memory leak  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: pg_ctl infinite loop and memory leak  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-bugs
Jeff Davis <pgsql@j-davis.com> writes:
> I attached a quick patch that seems to do the trick. It appears that
> fgets() will always return non-NULL if the size passed in is 1 (i.e.
> maxlength in the caller is 0).

Huh, interesting corner case.  I'd be inclined to fix by initializing
maxlength to 1 though.

Where's the memory leak?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5025: Aggregate function with subquery in 8.3 and 8.4.
Next
From: Jeff Davis
Date:
Subject: Re: pg_ctl infinite loop and memory leak