Re: Patch for PGunescapeBytea

Поиск
Список
Период
Сортировка
От Ben Lamb
Тема Re: Patch for PGunescapeBytea
Дата
Msg-id 200305081154.22776.pgsql-patches@zurgy.org
обсуждение исходный текст
Ответ на Re: Patch for PGunescapeBytea  ("Magnus Naeslund(f)" <mag@fbab.net>)
Ответы Re: Patch for PGunescapeBytea  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Here is a new patch for src/interfaces/libpq/fe-exec.c that incorporates the
change suggested by Magnus. The patch significantly improves the speed of
PGunescapeBytea().

Ben.


> [snip]
>
> I think these lines:
>
> buffer = realloc(buffer, buflen);
> ---
> if (buffer == NULL)
>     return NULL;
> ---
>
> are wrong. Shouldn't one do:
> ---
> tmpbuf=realloc(buf,...);
> if (!tmpbuf)
>     free(buf), return 0;
> ---
>
> to avoid a memory leak?
>
> ... just checking ;)
>
> Magnus


Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Pass shared memory address to exec'ed backend
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: 2nd nested trasanctions supporting patch