Re: pg_ctl infinite loop and memory leak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_ctl infinite loop and memory leak
Date: 2009-09-02 02:01:31
Message-ID: 22766.1251856891@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2009-09-02 02:38:08 Re: pg_ctl infinite loop and memory leak
Previous Message Tom Lane 2009-09-02 00:34:45 Re: BUG #5025: Aggregate function with subquery in 8.3 and 8.4.