summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-16 18:05:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:11 -0500
commit2202bbf4ab179e2c67f0448bcfaec81bb27ddb04 (patch)
tree531bd176164a63bd2e2a82350dabd234a80fab31 /source3
parente2e7ad91a9aa3b8a1270e1148550fee9e3fedc79 (diff)
downloadsamba-2202bbf4ab179e2c67f0448bcfaec81bb27ddb04.tar.gz
samba-2202bbf4ab179e2c67f0448bcfaec81bb27ddb04.tar.bz2
samba-2202bbf4ab179e2c67f0448bcfaec81bb27ddb04.zip
r20838: Small fix from Jiri.Sasek@Sun.COM to fix null
pointer deref. Jeremy (This used to be commit 34d891c81ad4226bb1f0e26902c4e4afaba6d62f)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/adt_tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index 05a470bc49..acd61ee477 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -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 */