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

r19146: merge from samba3:

talloc_reference() can fail

metze
This commit is contained in:
Stefan Metzmacher 2006-10-06 16:17:19 +00:00 committed by Gerald (Jerry) Carter
parent a2b996317f
commit 542cd5d029

View File

@ -134,7 +134,9 @@ struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx,
if (stat(path, &st) == 0) {
for (w=tdb_list;w;w=w->next) {
if (st.st_dev == w->device && st.st_ino == w->inode) {
talloc_reference(mem_ctx, w);
if (!talloc_reference(mem_ctx, w)) {
return NULL;
}
return w->tdb;
}
}