Re: SetVariable

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: SetVariable
Дата
Msg-id 000d01c36f20$42e95390$10d4a8c0@mm.eutelsat.org
обсуждение исходный текст
Ответ на Re: SetVariable  ("Gaetano Mendola" <mendola@bigfoot.com>)
Список pgsql-hackers
"Bruce Momjian" <pgman@candle.pha.pa.us> wrote:
> Gaetano Mendola wrote:
> > "Bruce Momjian" <pgman@candle.pha.pa.us> wrote:
> > > I see other strdup() calls that don't check on a return.  Should we
deal
> > > with those too?
> >
> > Well strdup obtain the memory for the new string using a malloc
> > and normally is a good habit check the return value of a malloc.
>
> Right.  My point is that we have lots of other strdup's in the code.
> Should we fix those too?  Seems we should be consistent.

Of course yes, consider also that inside SetVariable the check is
performed but too late, after that the old value was loose for ever.

Keep also the suggestion of Tom Late  about the xstrdup.

Regards
Gaetano Mendola




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

Предыдущее
От: Joe Conway
Дата:
Сообщение: database corruption
Следующее
От: "Gaetano Mendola"
Дата:
Сообщение: Re: SetVariable