summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-20 05:21:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:35 -0500
commitbb8d0c76b4f2ad61421f33aae6b268f3de98870f (patch)
treea71c53a765016f57456cba03c3df57efd85e4eea
parente3eec57b06f7e0f7c6c3e4dbbc814db27cc19a25 (diff)
downloadsamba-bb8d0c76b4f2ad61421f33aae6b268f3de98870f.tar.gz
samba-bb8d0c76b4f2ad61421f33aae6b268f3de98870f.tar.bz2
samba-bb8d0c76b4f2ad61421f33aae6b268f3de98870f.zip
r7780: fixed a bug in talloc_find_parent_byname()
(This used to be commit ee3fe42fb16821eedd564201d953042190f7826f)
-rw-r--r--source4/lib/talloc/talloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index c6f748ea3b..9dd7ef36c7 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -1127,7 +1127,7 @@ void *talloc_find_parent_byname(const void *context, const char *name)
while (tc->parent && (!tc->name || strcmp(tc->name, name))) {
tc = tc->parent;
}
- if (tc == NULL) {
+ if (tc == NULL || tc->name == NULL || strcmp(tc->name, name)) {
return NULL;
}
return (void *)(tc+1);