osaf/libs/agents/saf/imma/imma_db.c | 33 +++++++++++++++++++++++++++++++++
osaf/libs/agents/saf/imma/imma_om_api.c | 27 ---------------------------
2 files changed, 33 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
@@ -1183,6 +1183,11 @@ uint32_t imma_search_node_delete(IMMA_CB
if (search_node == NULL)
return NCSCC_RC_FAILURE;
+ if (search_node->mLastAttributes) {
+ imma_freeSearchAttrs(search_node->mLastAttributes);
+ search_node->mLastAttributes = NULL;
+ }
+
/* Remove the Node from the tree */
if (ncs_patricia_tree_del(&cb->search_tree, &search_node->patnode) !=
NCSCC_RC_SUCCESS) {
rc = NCSCC_RC_FAILURE;
@@ -1345,3 +1350,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
@@ -6287,33 +6287,6 @@ SaAisErrorT saImmOmSearchNext_2(SaImmSea
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;
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel