Skip to contentSkip to conversation

IrLMP open leak

PATCH Applied Jean Tourrilhes 2 participants 2 messages Nov 5, 2003 Networking

lore
Share & tools
lore
#0 lore raw

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
diff -u -p linux/net/irda/irlmp.d4.c linux/net/irda/irlmp.c
@@ -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 sls
 
 	init_timer(&self->watchdog_timer);
 
-	ASSERT(notify->instance != NULL, return NULL;);
 	self->notify = *notify;
 
 	self->lsap_state = LSAP_DISCONNECTED;
#1 lore raw
Quoted 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 in irlmp_open. ASSERT is compiled in only with DEBUG option => risk = 0.

Applied, thanks.