Skip to contentSkip to conversation

DSPBRIDGE: Avoid inserting wrong elements to STRM list

PATCH Applied Guzman Lugo, Fernando 2 participants 2 messages Feb 10, 2010 – Feb 16, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DSPBRIDGE: Avoid inserting wrong elements to STRM list

Quoted 1 line

From 09260a0211d088d840d09c04380c8c9448c01ec4 Mon Sep 17 00:00:00 2001

From: Fernando Guzman Lugo <[email protected]>
Date: Wed, 10 Feb 2010 02:33:54 -0600
Subject: [PATCH] DSPBRIDGE: Avoid inserting wrong elements to STRM list

This fixes a bug where in error case and after deleting a strm element (if allocated), the strm is still inserted as part of the process context allocated resources, this pointer is not valid and shouldn't be considered as part of valid resources.

---
 drivers/dsp/bridge/rmgr/strm.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/dsp/bridge/rmgr/strm.c +4 -4
index 1bb4670..e004205 100644
@@ -634,12 +634,12 @@ func_cont:
 				  status);
 		}
 	}
-	if (DSP_SUCCEEDED(status))
+	if (DSP_SUCCEEDED(status)) {
 		*phStrm = pStrm;
-	else
+		DRV_ProcInsertSTRMResElement(*phStrm, &hSTRMRes, pr_ctxt);
+	} else {
 		(void)DeleteStrm(pStrm);
-
-	DRV_ProcInsertSTRMResElement(*phStrm, &hSTRMRes, pr_ctxt);
+	}
 
 	 /* ensure we return a documented error code */
 	DBC_Ensure((DSP_SUCCEEDED(status) &&
Signature · 1 line
1.6.0.4
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 5 lines · Fernando

From 09260a0211d088d840d09c04380c8c9448c01ec4 Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo<[email protected]>
Date: Wed, 10 Feb 2010 02:33:54 -0600
Subject: [PATCH] DSPBRIDGE: Avoid inserting wrong elements to STRM list

Quoted 7 lines

This fixes a bug where in error case and after deleting a strm element (if allocated), the strm is still inserted as part of the process context allocated resources, this pointer is not valid and shouldn't be considered as part of valid resources.

Pushed to dspbridge

- omar