IrLMP open leak
PATCH 1/1 IrLMP open leak
ir2609_irlmp_open_leak.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~~
<Original patch from Chris Wright>
o [CORRECT] Prevent 'self' leak on error in irlmp_open. ASSERT is compiled in only with DEBUG option => risk = 0.
net/irda/irlmp.c renamed from net/irda/irlmp.d4.c +1 -1
@@ -146,6 +146,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 sls ASSERT(notify != NULL, return NULL;); ASSERT(irlmp != NULL, return NULL;); ASSERT(irlmp->magic == LMP_MAGIC, return NULL;); + ASSERT(notify->instance != NULL, return NULL;);/* Does the client care which Source LSAP selector it gets? */ if (slsap_sel ==LSAP_ANY ) {
@@ -178,7 +179,6 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsinit_timer (&self->watchdog_timer); - ASSERT(notify->instance != NULL, return NULL;); self->notify = *notify; self->lsap_state =LSAP_DISCONNECTED ;
David S. Miller
AppliedQuoted 5 lines · On Wed, 5 Nov 2003 11:41:25 -0800 Jean Tourrilhes <[email protected]> wrote:
ir2609_irlmp_open_leak.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~~
<Original patch from Chris Wright>
o [CORRECT] Prevent 'self' leak on error inirlmp_open. ASSERT is compiled in only with DEBUG option => risk = 0.
Applied, thanks.