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:
parent
44e228ac79
commit
e4f2183684
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user