Fix calloc check if oom (PQcancelCreate) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Fix calloc check if oom (PQcancelCreate)
Date
Msg-id CAEudQAqQFTH7xCB-+K6zEKjfqbhqCxcr_w4DuJTxVT6h3vzu2w@mail.gmail.com
Whole thread Raw
Responses Re: Fix calloc check if oom (PQcancelCreate)
List pgsql-hackers
Hi.

I think that commit 61461a3, left some oversight.
The function *PQcancelCreate* fails in check,
return of *calloc* function.

Trivial fix is attached.

But, IMO, I think that has more problems.
If any allocation fails, all allocations must be cleared.
Or is the current behavior acceptable?

best regards,
Ranier Vilela



Attachment

pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: DISCARD ALL does not force re-planning of plpgsql functions/procedures
Next
From: Alexander Korotkov
Date:
Subject: Re: POC: GROUP BY optimization