Re: [Linuxptp-users] Missing Sanity Checks for malloc()/calloc()/strdup() in linuxptp-1.5
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2015-08-22 19:07:45
|
On Fri, Aug 21, 2015 at 08:55:01AM +0200, Miroslav Lichvar wrote: > I think an easier and cleaner approach would be to write wrappers for > the strdup/calloc/malloc/realloc functions which just send an error > message and call exit(1) when the allocation fails, and use the > wrappers everywhere in the code. If you want to do that way for timemaster, fine. But for ptp4l/pmc/phc2sys, I prefer proper error handling. Thanks, Richard |