[svn-commits] kpfleming: linux/trunk r5064 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Oct 6 15:52:43 CDT 2008


Author: kpfleming
Date: Mon Oct  6 15:52:43 2008
New Revision: 5064

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5064
Log:
use the same logic here as elsewhere for releasing echocan module references

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=5064&r1=5063&r2=5064
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Oct  6 15:52:43 2008
@@ -4975,6 +4975,8 @@
 				chan->ppp = kzalloc(sizeof(struct ppp_channel), GFP_KERNEL);
 				if (chan->ppp) {
 					struct echo_can_state *tec;
+					const struct dahdi_echocan *ec_current;
+
 					chan->ppp->private = chan;
 					chan->ppp->ops = &ztppp_ops;
 					chan->ppp->mtu = DAHDI_DEFAULT_MTU_MRU;
@@ -4996,6 +4998,8 @@
 					}
 					tec = chan->ec_state;
 					chan->ec_state = NULL;
+					ec_current = chan->ec_current;
+					chan->ec_current = NULL;
 					chan->echocancel = 0;
 					chan->echostate = ECHO_STATE_IDLE;
 					chan->echolastupdate = 0;
@@ -5010,8 +5014,10 @@
 					chan->flags |= (DAHDI_FLAG_PPP | DAHDI_FLAG_HDLC | DAHDI_FLAG_FCS);
 					hw_echocancel_off(chan);
 
-					if (tec)
-						chan->ec_current->echo_can_free(tec);
+					if (tec) {
+						ec_current->echo_can_free(tec);
+						release_echocan(ec_current)
+					}
 				} else
 					return -ENOMEM;
 			}




More information about the svn-commits mailing list