Detecting community structure is an important research topic in complex network analysis. How to improve community detection results by using various features in the network is a very challenging problem. The scale-free and attributes of nodes are the two relatively independent aspects of the complex networks in the real world, the former is an inherent structural feature from the global perspective and the later can be used to significantly enhance community detection and community semantics. However, these two aspects are usually modeled and computed independently in previous methods. Based on that, we propose a novel unified Bayesian generative model which combines network topology and node attributes simultaneously to identify community structures via considering to model the scale-free feature. We propose the degree decay variable to preserve the power-law degree characteristic of the network. Specifically, this model composes of two closely correlated parts by a probabilistic transition matrix, one for network topology and the other for nodes attributes. Moreover, we develop a variational EM algorithm to optimize the objective function of the model. Experiments on synthetic and real networks show that our model has a better performance compared with some baselines on community detection in attribute networks.