summaryrefslogtreecommitdiff
path: root/wilink_6_1/stad
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2009-09-02 12:50:52 -0700
committerDmitry Shmidt <dimitrysh@google.com>2009-09-02 12:50:52 -0700
commit845fe88e793e8bbdf6824b2e158ed3e1372df9a6 (patch)
tree1fd63725ea642209d625d276ac991cae9b23bd6b /wilink_6_1/stad
parentea0e64cebf60071015a036d7ea77363512f75d30 (diff)
downloadti-845fe88e793e8bbdf6824b2e158ed3e1372df9a6.tar.gz
Fix memory leaks.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wilink_6_1/stad')
-rw-r--r--wilink_6_1/stad/src/Connection_Managment/externalSec.c10
-rw-r--r--wilink_6_1/stad/src/Connection_Managment/externalSec.h1
-rw-r--r--wilink_6_1/stad/src/Connection_Managment/mainSecSm.c7
-rw-r--r--wilink_6_1/stad/src/Ctrl_Interface/DrvMain.c5
4 files changed, 23 insertions, 0 deletions
diff --git a/wilink_6_1/stad/src/Connection_Managment/externalSec.c b/wilink_6_1/stad/src/Connection_Managment/externalSec.c
index 0b470e8..0e932f8 100644
--- a/wilink_6_1/stad/src/Connection_Managment/externalSec.c
+++ b/wilink_6_1/stad/src/Connection_Managment/externalSec.c
@@ -322,3 +322,13 @@ TI_STATUS externalSecSM_Unexpected(struct externalSec_t *pExternalSec)
return(TI_OK);
}
+TI_STATUS externalSec_unload(struct externalSec_t *pExternalSec)
+{
+ TI_STATUS status = TI_NOK;
+ if (!pExternalSec) {
+ return status;
+ }
+ status = fsm_Unload(pExternalSec->hOs, pExternalSec->pExternalSecSm);
+ os_memoryFree(pExternalSec->hOs, pExternalSec, sizeof(struct externalSec_t));
+ return status;
+}
diff --git a/wilink_6_1/stad/src/Connection_Managment/externalSec.h b/wilink_6_1/stad/src/Connection_Managment/externalSec.h
index d7253ba..ab29680 100644
--- a/wilink_6_1/stad/src/Connection_Managment/externalSec.h
+++ b/wilink_6_1/stad/src/Connection_Managment/externalSec.h
@@ -100,4 +100,5 @@ TI_STATUS externalSec_config(mainSec_t *pMainSec);
struct externalSec_t* externalSec_create(TI_HANDLE hOs);
TI_STATUS externalSec_event(struct externalSec_t *pExternalSec, TI_UINT8 event, void *pData);
TI_STATUS externalSec_rsnComplete(struct externalSec_t *pExternalSec);
+TI_STATUS externalSec_unload(struct externalSec_t *pExternalSec);
#endif /* _EXTERNAL_SEC_H*/
diff --git a/wilink_6_1/stad/src/Connection_Managment/mainSecSm.c b/wilink_6_1/stad/src/Connection_Managment/mainSecSm.c
index 867887c..97fb701 100644
--- a/wilink_6_1/stad/src/Connection_Managment/mainSecSm.c
+++ b/wilink_6_1/stad/src/Connection_Managment/mainSecSm.c
@@ -266,6 +266,13 @@ TI_STATUS mainSec_unload(mainSec_t *pMainSec)
TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error releasing FSM memory \n");
}
+ status = externalSec_unload(pMainSec->pExternalSec);
+ if (status != TI_OK)
+ {
+ /* report failure but don't stop... */
+ TRACE0(pMainSec->hReport, REPORT_SEVERITY_ERROR, "MAIN_SEC_SM: Error releasing ExternalSec memory \n");
+ }
+
os_memoryFree(pMainSec->hOs, pMainSec, sizeof(mainSec_t));
return TI_OK;
diff --git a/wilink_6_1/stad/src/Ctrl_Interface/DrvMain.c b/wilink_6_1/stad/src/Ctrl_Interface/DrvMain.c
index 4bc70b9..eff2e5b 100644
--- a/wilink_6_1/stad/src/Ctrl_Interface/DrvMain.c
+++ b/wilink_6_1/stad/src/Ctrl_Interface/DrvMain.c
@@ -658,6 +658,11 @@ TI_STATUS drvMain_Destroy (TI_HANDLE hDrvMain)
scr_release (pDrvMain->tStadHandles.hSCR);
}
+ if (pDrvMain->tStadHandles.hTxnQ != NULL)
+ {
+ txnQ_Destroy (pDrvMain->tStadHandles.hTxnQ);
+ }
+
if (pDrvMain->tStadHandles.hEvHandler != NULL)
{
EvHandlerUnload (pDrvMain->tStadHandles.hEvHandler);