[PATCH 2.6 IrDA] IrLMP open leak

From: Jean Tourrilhes
Date: Wed Nov 05 2003 - 14:44:14 EST


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.


diff -u -p linux/net/irda/irlmp.d4.c linux/net/irda/irlmp.c
--- linux/net/irda/irlmp.d4.c Tue Nov 4 10:52:38 2003
+++ linux/net/irda/irlmp.c Tue Nov 4 10:53:46 2003
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/