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

smbd: use pconn = talloc_move(ctx, &conn) in create_conn_struct_as_root()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-05-25 08:49:29 +02:00
parent d156483d64
commit ee8ea5ce01

View File

@ -354,7 +354,7 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
}
conn->fs_capabilities = SMB_VFS_FS_CAPABILITIES(conn, &conn->ts_res);
*pconn = conn;
*pconn = talloc_move(ctx, &conn);
return NT_STATUS_OK;
}
@ -416,7 +416,6 @@ NTSTATUS create_conn_struct_tos(struct messaging_context *msg,
TALLOC_FREE(c);
return status;
}
talloc_steal(c, c->conn);
talloc_set_destructor(c, conn_struct_tos_destructor);