1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r7780: fixed a bug in talloc_find_parent_byname()

This commit is contained in:
Andrew Tridgell 2005-06-20 05:21:11 +00:00 committed by Gerald (Jerry) Carter
parent b0ad505510
commit ee3fe42fb1

View File

@ -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);