Fix PRSDK-747 DEV.RM_LLD.02.02.00.02
authorJustin Sobota <jsobota@ti.com>
Thu, 12 May 2016 15:34:34 +0000 (11:34 -0400)
committerJustin Sobota <jsobota@ti.com>
Thu, 12 May 2016 15:34:34 +0000 (11:34 -0400)
Signed-off-by: Justin Sobota <jsobota@ti.com>
docs/ReleaseNotes_RM.doc
docs/ReleaseNotes_RM.pdf
src/rm_tree.c

index 38228c534be591933b0f9e42ea44b8eb67cacc97..ee481810c7b9224bb63d14aa618d15e73794a641 100644 (file)
Binary files a/docs/ReleaseNotes_RM.doc and b/docs/ReleaseNotes_RM.doc differ
index 87460e1cd0c68190968d718cb6a7b11eb50f7fef..c8f705da6ff279864b19a0fed02f85c9575a9eb7 100644 (file)
Binary files a/docs/ReleaseNotes_RM.pdf and b/docs/ReleaseNotes_RM.pdf differ
index a0cc76ad7cc640e0243b0c47444475929bfbf204..2a5d7981c4aeedd56890d106fc73622366dcaa66 100644 (file)
@@ -6,7 +6,7 @@
  *
  *  \par
  *  ============================================================================
- *  @n   (C) Copyright 2012-2015, Texas Instruments, Inc.
+ *  @n   (C) Copyright 2012-2016, Texas Instruments, Inc.
  * 
  *  Redistribution and use in source and binary forms, with or without 
  *  modification, are permitted provided that the following conditions 
@@ -83,10 +83,12 @@ void rmNameServerTreeWb(Rm_NameServerTree *treeRoot)
 
     /* Writeback each element in the tree */
     node = RB_MIN(_Rm_NameServerTree, treeRoot);
-    do {
-        Rm_osalEndMemAccess((void *)node, sizeof(*node));
-        node = RB_NEXT(_Rm_NameServerTree, treeRoot, node);
-    } while (node);
+    if (node) {
+        do {
+            Rm_osalEndMemAccess((void *)node, sizeof(*node));
+            node = RB_NEXT(_Rm_NameServerTree, treeRoot, node);
+        } while (node);
+    }
 
     /* Writeback the tree root */
     Rm_osalEndMemAccess((void *)treeRoot, sizeof(*treeRoot));
@@ -186,10 +188,12 @@ void rmPolicyValidInstTreeWb(Rm_PolicyValidInstTree *treeRoot)
 
     /* Writeback each element in the tree */
     node = RB_MIN(_Rm_PolicyValidInstTree, treeRoot);
-    do {
-        Rm_osalEndMemAccess((void *)node, sizeof(*node));
-        node = RB_NEXT(_Rm_PolicyValidInstTree, treeRoot, node);
-    } while (node);
+    if (node) {
+        do {
+            Rm_osalEndMemAccess((void *)node, sizeof(*node));
+            node = RB_NEXT(_Rm_PolicyValidInstTree, treeRoot, node);
+        } while (node);
+    }
 
     /* Writeback the tree root */
     Rm_osalEndMemAccess((void *)treeRoot, sizeof(*treeRoot));
@@ -291,10 +295,12 @@ void rmResourceTreeWb(Rm_ResourceTree *treeRoot)
 
     /* Writeback each element in the tree */
     node = RB_MIN(_Rm_AllocatorResourceTree, treeRoot);
-    do {
-        Rm_osalEndMemAccess((void *)node, sizeof(*node));
-        node = RB_NEXT(_Rm_AllocatorResourceTree, treeRoot, node);
-    } while (node);
+    if (node) {
+        do {
+            Rm_osalEndMemAccess((void *)node, sizeof(*node));
+            node = RB_NEXT(_Rm_AllocatorResourceTree, treeRoot, node);
+        } while (node);
+    }
 
     /* Writeback the tree root */
     Rm_osalEndMemAccess((void *)treeRoot, sizeof(*treeRoot));
@@ -413,11 +419,13 @@ void rmPolicyTreeWb(Rm_PolicyTree *treeRoot)
 
     /* Writeback each element in the tree */
     node = RB_MIN(_Rm_AllocatorPolicyTree, treeRoot);
-    do {
-        Rm_osalEndMemAccess((void *)node, sizeof(*node));
-        Rm_osalEndMemAccess((void *)node->perms, node->permsLen);
-        node = RB_NEXT(_Rm_AllocatorPolicyTree, treeRoot, node);
-    } while (node);
+    if (node) {
+        do {
+            Rm_osalEndMemAccess((void *)node, sizeof(*node));
+            Rm_osalEndMemAccess((void *)node->perms, node->permsLen);
+            node = RB_NEXT(_Rm_AllocatorPolicyTree, treeRoot, node);
+        } while (node);
+    }
 
     /* Writeback the tree root */
     Rm_osalEndMemAccess((void *)treeRoot, sizeof(*treeRoot));
@@ -539,13 +547,15 @@ void rmAllocatorTreeWb(Rm_AllocatorTree *treeRoot)
 
     /* Writeback each element in the tree */
     node = RB_MIN(_Rm_AllocatorTree, treeRoot);
-    do {
-        rmResourceTreeWb(node->resourceRoot);
-        rmPolicyTreeWb(node->policyRoot);
+    if (node) {
+        do {
+            rmResourceTreeWb(node->resourceRoot);
+            rmPolicyTreeWb(node->policyRoot);
 
-        Rm_osalEndMemAccess((void *)node, sizeof(*node));
-        node = RB_NEXT(_Rm_AllocatorTree, treeRoot, node);
-    } while (node);
+            Rm_osalEndMemAccess((void *)node, sizeof(*node));
+            node = RB_NEXT(_Rm_AllocatorTree, treeRoot, node);
+        } while (node);
+    }
 
     /* Writeback the tree root */
     Rm_osalEndMemAccess((void *)treeRoot, sizeof(*treeRoot));