On Mo, 2007-06-11 at 11:51 -0700, Evan Stade wrote:
This looks not correct. You returned "OutOfMemory", but you check "pen". I think, you really mean "gp_pen" in that "if".
A test with pen==NULL would be nice.
You leak the allocated memory from gp_pen here. The FIXME does not help very much. You should dump the value for the unsupported unit.
This is dead code in this location. When the allocation for gp_pen failed, you will never reach this line, because gp_pen was accesed before and produced a crash.