summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-16 18:05:37 +0000
committerJeremy Allison <jra@samba.org>2007-01-16 18:05:37 +0000
commitae52faa44a0948985e5b4d99438735c0ffd373a2 (patch)
treeef7329462094d490446d62f16eb1301d586cd3e1 /source/lib
parent33bbde88ebae593a56dfa03ad944e092034d4f2f (diff)
downloadsamba-ae52faa44a0948985e5b4d99438735c0ffd373a2.tar.gz
samba-ae52faa44a0948985e5b4d99438735c0ffd373a2.tar.xz
samba-ae52faa44a0948985e5b4d99438735c0ffd373a2.zip
r20838: Small fix from Jiri.Sasek@Sun.COM to fix null
pointer deref. Jeremy
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/adt_tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/lib/adt_tree.c b/source/lib/adt_tree.c
index 05a470bc49e..acd61ee4775 100644
--- a/source/lib/adt_tree.c
+++ b/source/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 */