From: Michael R. <mi...@re...> - 2012-03-25 12:05:43
|
Hi Marcus, Martin, I try to think about the other stuff ASAP, but.... > I don't understand the realloc error handling in 'timer_add_widget' > (similar in 'timer_add').In the case of a realloc error 'TimerGroupWidgets' > was set to NULL. So there's no valid pointer to the existing > TimerGroupWidgets after that. Won't that cause a memory leak and > following errors cause nTimerGroupWidgets is only decreased by 1 > instead of set it to 0? Shouldn't a additional pointer be used for > the realloc return value to avoid this? You are *that* right. This is junk. junk junk junk. OTOH I think this will never happen in real life. When such a small allocation fails, I'm pretty sure that you will have other problems :-) anyway, this should be cleaned up. sunny greetings, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |