Ensure we don't dereference a null pointer.
Made emem_canary() static. svn path=/trunk/; revision=30186
This commit is contained in:
parent
ff7492d22d
commit
e362a37cbc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue