@@ -1347,13 +1347,14 @@ static int rmmAlloc(struct Dynamic_Loader_Allocate *this,
req, segId);
}
}
+func_cont:
MEM_Free(szSectName);
szSectName = NULL;
MEM_Free(szLastToken);
szLastToken = NULL;
MEM_Free(szSecLastToken);
szSecLastToken = NULL;
-func_cont:
+
if (memType == DBLL_CODE)
allocSize = info->size + GEM_L1P_PREFETCH_SIZE;
else
@@ -616,7 +616,6 @@ DSP_STATUS DRV_Create(OUT struct DRV_OBJECT **phDRVObject)
status = DSP_EFAIL;
GT_0trace(curTrace, GT_7CLASS,
"Failed to Create DRV_EXT list ");
- MEM_FreeObject(pDRVObject);
} else {
INIT_LIST_HEAD(&pDRVObject->devNodeString->
head);
@@ -626,7 +625,6 @@ DSP_STATUS DRV_Create(OUT struct DRV_OBJECT **phDRVObject)
status = DSP_EMEMORY;
GT_0trace(curTrace, GT_7CLASS,
"Failed to Create Dev List ");
- MEM_FreeObject(pDRVObject);
}
} else {
status = DSP_EMEMORY;
@@ -642,6 +640,8 @@ DSP_STATUS DRV_Create(OUT struct DRV_OBJECT **phDRVObject)
pDRVObject);
*phDRVObject = pDRVObject;
} else {
+ MEM_Free(pDRVObject->devList);
+ MEM_Free(pDRVObject->devNodeString);
/* Free the DRV Object */
MEM_Free(pDRVObject);
GT_0trace(curTrace, GT_7CLASS,
@@ -129,8 +129,8 @@ DSP_STATUS WMD_MSG_CreateQueue(struct MSG_MGR *hMsgMgr,
DSP_STATUS status = DSP_SOK;
if (!MEM_IsValidHandle(hMsgMgr, MSGMGR_SIGNATURE) ||
- phMsgQueue == NULL) {
- status = DSP_EMEMORY;
+ phMsgQueue == NULL || !hMsgMgr->msgFreeList) {
+ status = DSP_EHANDLE;
goto func_end;
}
@@ -177,10 +177,6 @@ DSP_STATUS WMD_MSG_CreateQueue(struct MSG_MGR *hMsgMgr,
status = SYNC_OpenEvent(&pMsgQ->hSyncDoneAck, NULL);
if (DSP_SUCCEEDED(status)) {
- if (!hMsgMgr->msgFreeList) {
- status = DSP_EHANDLE;
- goto func_end;
- }
/* Enter critical section */
(void)SYNC_EnterCS(hMsgMgr->hSyncCS);
/* Initialize message frames and put in appropriate queues */