r20838: Small fix from Jiri.Sasek@Sun.COM to fix null
authorJeremy Allison <jra@samba.org>
Tue, 16 Jan 2007 18:05:37 +0000 (18:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:11 +0000 (12:17 -0500)
pointer deref.
Jeremy
(This used to be commit 34d891c81ad4226bb1f0e26902c4e4afaba6d62f)

source3/lib/adt_tree.c

index 05a470bc49ee9349a15f3ff6ddcc7054f48bf37a..acd61ee4775df3c63ebf45af4b999acac250aaa4 100644 (file)
@@ -334,7 +334,7 @@ static void pathtree_print_children( TREE_NODE *node, int debug, const char *pat
 
  void* pathtree_find( SORTED_TREE *tree, char *key )
 {
-       char *keystr, *base, *str, *p;
+       char *keystr, *base = NULL, *str = NULL, *p;
        TREE_NODE *current;
        void *result = NULL;
        
@@ -383,7 +383,8 @@ static void pathtree_print_children( TREE_NODE *node, int debug, const char *pat
                trim_tree_keypath( p, &base, &str );
                        
                DEBUG(11,("pathtree_find: [loop] base => [%s], new_path => [%s]\n", 
-                       base, str));
+                       base ? base : "",
+                       str ? str : ""));
 
                /* iterate to the next child */