*Salutes*
On Fri, 28 May 2004, Randy.Dunlap wrote:
> Yes. Each return path needs to deallocate/free whatever has been
> allocated up to that point. However, don't duplicate code at
> each return point. At the first return point, use something like
> 'goto err_reason1;' and do whatever needs to be done there.
> At the second return point, use 'goto err_reason2;' and do what
> needs to be done there, and then fall thru to the <reason1> code.
> (and use meaningful names for the reasons.)
>
> There are plenty of examples of error-handling code like this if
> you have problems with it.
>
> Then after rx.c is done, rkt.c and sa.c need to the same treatments... :)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
|