Ensure we don't dereference a null pointer.

Made emem_canary() static.

svn path=/trunk/; revision=30186
This commit is contained in:
Stig Bjørlykke 2009-09-29 06:50:35 +00:00
parent ff7492d22d
commit e362a37cbc
1 changed files with 5 additions and 1 deletions

View File

@ -147,7 +147,7 @@ static intptr_t pagesize;
/*
* Set a canary value to be placed between memchunks.
*/
void
static void
emem_canary(guint8 *canary) {
int i;
static GRand *rand_state = NULL;
@ -903,6 +903,10 @@ emem_tree_lookup32_le(emem_tree_t *se_tree, guint32 key)
}
if(!node){
return NULL;
}
/* If we are still at the root of the tree this means that this node
* is either smaller than the search key and then we return this
* node or else there is no smaller key available and then