osaf/libs/agents/saf/imma/imma_om_api.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Fix free of memory in saImmOmSearchNext_2 when imma type is not 
IMMA_EVT_ND2A_SEARCHNEXT_RSP.

diff --git a/osaf/libs/agents/saf/imma/imma_om_api.c 
b/osaf/libs/agents/saf/imma/imma_om_api.c
--- a/osaf/libs/agents/saf/imma/imma_om_api.c
+++ b/osaf/libs/agents/saf/imma/imma_om_api.c
@@ -6415,7 +6415,7 @@ SaAisErrorT saImmOmSearchNext_2(SaImmSea
 
        if (out_evt) {
                /* Free the search_next structure. */
-               if (out_evt->info.imma.info.searchNextRsp) {
+               if ((out_evt->info.imma.type == IMMA_EVT_ND2A_SEARCHNEXT_RSP) 
&& out_evt->info.imma.info.searchNextRsp) {
                        
free(out_evt->info.imma.info.searchNextRsp->objectName.buf);
                        out_evt->info.imma.info.searchNextRsp->objectName.buf = 
NULL;
                        out_evt->info.imma.info.searchNextRsp->objectName.size 
= 0;

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to