1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-01 21:18:10 +03:00

r19145: talloc_reference() can fail!

metze
This commit is contained in:
Stefan Metzmacher 2006-10-06 16:14:41 +00:00 committed by Gerald (Jerry) Carter
parent 44e228ac79
commit e4f2183684

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;
}
}