Re: The Axe list
От | Martijn van Oosterhout |
---|---|
Тема | Re: The Axe list |
Дата | |
Msg-id | 20081012151033.GB14629@svana.org обсуждение исходный текст |
Ответ на | Re: The Axe list ("D'Arcy J.M. Cain" <darcy@druid.net>) |
Список | pgsql-hackers |
On Sun, Oct 12, 2008 at 10:41:21AM -0400, D'Arcy J.M. Cain wrote: > > > + if ((result = (char *) palloc(16)) != NULL) > > > + { > > > + result[0] = ':'; > > > + strcpy(result + 1, password->password); > > > + } > > > > AFAIK palloc() cannot return NULL? > > Really? My program will simply come crashing down if there is a memory > problem without giving me a chance to clean up? If by "come crashing down" you mean "the transaction will be aborted, all memory and other resources freed and the user gets a nice error message", then yes. palloc will never return an invalid pointer. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
В списке pgsql-hackers по дате отправления: