DSPBRIDGE: Avoid inserting wrong elements to STRM list
PATCH 1/1 DSPBRIDGE: Avoid inserting wrong elements to STRM list
Quoted 1 line
From
09260a0211d088d840d09c04380c8c9448c01ec4Mon 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
@@ -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
Quoted 5 lines · Fernando
From
09260a0211d088d840d09c04380c8c9448c01ec4Mon 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.
Signed-off-by Fernando Guzman Lugo<[email protected]>
Pushed to dspbridge
- omar