osaf/libs/agents/saf/imma/imma_db.c     |  31 +++++++++++++++++++++++++++++++
 osaf/libs/agents/saf/imma/imma_om_api.c |  28 +---------------------------
 2 files changed, 32 insertions(+), 27 deletions(-)


diff --git a/osaf/libs/agents/saf/imma/imma_db.c 
b/osaf/libs/agents/saf/imma/imma_db.c
--- a/osaf/libs/agents/saf/imma/imma_db.c
+++ b/osaf/libs/agents/saf/imma/imma_db.c
@@ -1192,6 +1192,9 @@ uint32_t imma_search_node_delete(IMMA_CB
                free(search_node->searchBundle->searchResult);
                free(search_node->searchBundle);
                search_node->searchBundle = NULL;
+       } else if (!search_node->mSearchId && search_node->mLastAttributes) {
+               imma_freeSearchAttrs(search_node->mLastAttributes);
+               search_node->mLastAttributes = NULL;
        }
 
        /* Remove the Node from the tree */
@@ -1356,3 +1359,31 @@ SaStringT* imma_getErrorStrings(IMMSV_SA
  done:
        return errStringArr;
 }
+
+void imma_freeSearchAttrs(SaImmAttrValuesT_2 **attr)
+{
+       SaImmAttrValuesT_2 *att = NULL;
+       int ix;
+       for (ix = 0; attr[ix]; ++ix) {
+               int ix2; 
+
+               att = attr[ix];
+               free(att->attrName);    /*free-3 */
+               att->attrName = NULL;
+
+               for (ix2 = 0; ix2 < att->attrValuesNumber; ++ix2) {
+                       SaImmAttrValueT aval = att->attrValues[ix2];
+                       imma_freeAttrValue3(aval, att->attrValueType);  
/*free-5 */
+               }    
+               free(att->attrValues);  /*free-4 */
+               att->attrValues = NULL;
+               att->attrValuesNumber = 0; 
+               att->attrValueType = 0; 
+
+               free(att);      /*free-2 */
+               attr[ix] = NULL;
+       }    
+
+       free(attr);             /*free-1 */
+}
+
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
@@ -5505,6 +5505,7 @@ mds_send_fail:
                        
if(out_evt->info.imma.info.searchNextRsp->attrValuesList) {
                                
immsv_free_attrvalues_list(out_evt->info.imma.info.searchNextRsp->attrValuesList);
                        }
+                       
free(out_evt->info.imma.info.searchNextRsp->objectName.buf);
                        free(out_evt->info.imma.info.searchNextRsp);
                        out_evt->info.imma.info.searchNextRsp = NULL;
                }
@@ -6656,33 +6657,6 @@ searchresult:
        return error;
 }
 
-void imma_freeSearchAttrs(SaImmAttrValuesT_2 **attr)
-{
-       SaImmAttrValuesT_2 *att = NULL;
-       int ix;
-       for (ix = 0; attr[ix]; ++ix) {
-               int ix2;
-
-               att = attr[ix];
-               free(att->attrName);    /*free-3 */
-               att->attrName = NULL;
-
-               for (ix2 = 0; ix2 < att->attrValuesNumber; ++ix2) {
-                       SaImmAttrValueT aval = att->attrValues[ix2];
-                       imma_freeAttrValue3(aval, att->attrValueType);  
/*free-5 */
-               }
-               free(att->attrValues);  /*free-4 */
-               att->attrValues = NULL;
-               att->attrValuesNumber = 0;
-               att->attrValueType = 0;
-
-               free(att);      /*free-2 */
-               attr[ix] = NULL;
-       }
-
-       free(attr);             /*free-1 */
-}
-
 SaAisErrorT saImmOmSearchFinalize(SaImmSearchHandleT searchHandle)
 {
        SaAisErrorT error = SA_AIS_OK;

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&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