@@ -1543,8 +1543,9 @@ DSP_STATUS DRV_ReleaseResources(u32 dwContext, struct DRV_OBJECT *hDrvObject)
* The following will over write the status.
*/
for (pszdevNode = (struct DRV_EXT *)DRV_GetFirstDevExtension();
- pszdevNode != NULL; pszdevNode = (struct DRV_EXT *)
- DRV_GetNextDevExtension((u32)pszdevNode)) {
+ pszdevNode != NULL && pDRVObject->devNodeString != NULL;
+ pszdevNode = (struct DRV_EXT *)
+ DRV_GetNextDevExtension((u32) pszdevNode)) {
if ((u32)pszdevNode == dwContext) {
/* Found it */
/* Delete from the Driver object list */