From: Florian Westphal <[EMAIL PROTECTED]>
Date: Wed, 25 Jul 2007 00:02:56 +0200
> if printbuf allocation or tipc_node_attach_link() fails, invalid
> references to the link are left in the associated node and bearer
> structures.
> Fix by allocating printbuf early and moving timer initialization
>
if printbuf allocation or tipc_node_attach_link() fails, invalid
references to the link are left in the associated node and bearer
structures.
Fix by allocating printbuf early and moving timer initialization
and the addition of the new link to the b_ptr->links list after
tipc_node_attach_link() suc
Hi Florian:
Changes look pretty good to me.
I'd also recommend deferring the call to k_init_timer() to the same
point as your list_add_tail() call. (If you don't, then there should
really be a k_term_timer() call in the clean up code that handles a
failure of tipc_node_attach_link().)
Regards,
if printbuf allocation or tipc_node_attach_link() fails, invalid
references to the link are left in the associated node and bearer
structures.
Fix by doing printbuf allocation early and adding the new link
to b_ptr->links after tipc_node_attach_link() succeeded.
Signed-off-by: Florian Westphal <[E