diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-27 13:27:48 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-27 13:27:48 +0000 |
commit | 558ef3412c2ab483a8b474f860a2a37165a8c085 (patch) | |
tree | fc2d3101a85cb0073eb79b7b67d8efca88581ec8 /cpukit/score/src | |
parent | 2011-07-26 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-558ef3412c2ab483a8b474f860a2a37165a8c085.tar.bz2 |
2011-07-27 Petr Benes <benesp16@fel.cvut.cz>
PR 1856/cpukit
* posix/src/pthread.c, posix/src/pthreadjoin.c,
score/src/rbtreeextract.c: Do not derefence NULL.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/rbtreeextract.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpukit/score/src/rbtreeextract.c b/cpukit/score/src/rbtreeextract.c index a31a82a70f..9227cadfc3 100644 --- a/cpukit/score/src/rbtreeextract.c +++ b/cpukit/score/src/rbtreeextract.c @@ -164,9 +164,11 @@ void _RBTree_Extract_unprotected( /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; - the_node->child[RBT_RIGHT]->parent = target; + if (the_node->child[RBT_RIGHT]) + the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; - the_node->child[RBT_LEFT]->parent = target; + if (the_node->child[RBT_LEFT]) + the_node->child[RBT_LEFT]->parent = target; /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. |