Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Дата
Msg-id CAB7nPqRmXz2DymNd_BX8HkaRJuQCTUyhh2d5Zx+d0aHNvpTw0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x  (Bill Parker <wp02855@gmail.com>)
Ответы Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
On Fri, Jun 12, 2015 at 4:22 AM, Bill Parker wrote:
>    In reviewing some code, in directory 'postgresql-9.4.3/src/pl/tcl',
> file 'pltcl.c', there are several instances where calls to malloc()
> are made, but no check for a return value of NULL is made, which
> would indicate failure.   Additionally, it appears when malloc()
> returns NULL, previously allocated memory in function 'perm_fmgr_info'
> is not released, which could lead to memory leaks (even though the
> comment at the top says 'this routine is a crock' :)
>
> If you know how this problem might be fixed, list the solution below:
> Please feel free to review and comment on the above patch file...

Oh, nice catch again.

> I am attaching the patch file to this bug report

By the way, your patch does not compile properly and is not in-line
with the project's code format. See the updated patch attached ;)
--
Michael

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Lack of Sanity Checking in file 'misc.c' for PostgreSQL 9.4.x
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: Lack of Sanity Checking in file 'misc.c' for PostgreSQL 9.4.x