Re: Out-of-memory error reports in libpq

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: Out-of-memory error reports in libpq
Date: 2021-07-29 11:17:41
Message-ID: CAEudQAp8V=pHFDutvgPTFmEqac3YZTVT_RfsqBcuprpcMTa+WQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em qui., 29 de jul. de 2021 às 00:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:

> Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> writes:
> > IMO, I think that "char *msg" is unnecessary, isn't it?
>
> > + if (!PQExpBufferBroken(errorMessage))
> > + res->errMsg = pqResultStrdup(res, errorMessage->data);
> > else
> > - res->errMsg = NULL;
> > + res->errMsg = libpq_gettext("out of memory\n");
>
> Please read the comment.
>
You're right, I missed pqResultStrdup fail.

+1

regards,
Ranier Vilela

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-07-29 11:23:17 Re: Out-of-memory error reports in libpq
Previous Message Dilip Kumar 2021-07-29 11:17:09 Re: [Patch] ALTER SYSTEM READ ONLY