Prevent accessing freed signalling instance memory during detach processing.

This commit is contained in:
Mike Spengler 1999-01-19 23:14:51 +00:00
parent 05693a30ce
commit 4515a6631a
1 changed files with 9 additions and 12 deletions

View File

@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
* @(#) $Id: unisig_sigmgr_state.c,v 1.2 1998/09/17 09:35:02 phk Exp $
* @(#) $Id: unisig_sigmgr_state.c,v 1.3 1998/10/31 20:07:01 phk Exp $
*
*/
@ -47,7 +47,7 @@
#include <netatm/uni/sscf_uni.h>
#ifndef lint
__RCSID("@(#) $Id: unisig_sigmgr_state.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
__RCSID("@(#) $Id: unisig_sigmgr_state.c,v 1.3 1998/10/31 20:07:01 phk Exp $");
#endif
@ -816,11 +816,6 @@ unisig_sigmgr_act14(usp, m)
T_ATM_CAUSE_NORMAL_CALL_CLEARING);
}
/*
* Set the signalling manager state
*/
usp->us_state = UNISIG_DETACH;
/*
* Close the signalling channel
*/
@ -849,12 +844,14 @@ unisig_sigmgr_act14(usp, m)
UNLINK((struct siginst *)usp, struct siginst,
smp->sm_prinst, si_next);
KM_FREE(usp, sizeof(struct unisig), M_DEVBUF);
} else {
/*
* Otherwise, set new signalling manager state and
* wait for protocol instance to be freed during
* unisig_free processing for the last queued VCC
*/
usp->us_state = UNISIG_DETACH;
}
/*
* Otherwise, wait for protocol instance to be freed
* during unisig_free processing for the last queued VCC
*/
return (0);
}