Re: SetVariable
От
Bruce Momjian
Тема
Re: SetVariable
Дата
Msg-id
200309011702.h81H26o17673@candle.pha.pa.us
Ответ на
Re: SetVariable (Mendola Gaetano)
Список
Дерево обсуждения
Re: SetVariable "Mendola Gaetano" <mendola@bigfoot.com>
Mendola Gaetano wrote: > "Bruce Momjian" wrote: > > Gaetano Mendola wrote: > > > "Bruce Momjian" 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. > > Shall I post the patch for SetVariable ? > > I know that this change is not so important but I want to try > on my skin the cycle > seen somethink wrong => send patch => be applyed Sure. It would be good if you would evaluate all the strdups, find the ones that don't check properly, and submit a big patch of all those. The fix can be to call xstrdup, or to check the return code. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-hackers по дате отправления
От: Bruce Momjian
Дата: