Although there are some tools supporting to detect the program's use-after-free vulnerability, their performance may be degraded because of the restriction they have. In order to detect the program's use-after-free vulnerability with a relatively higher efficiency, in this paper, we propose an automated approach for checking the use-after-free vulnerability in the application. First, we deliberate and choose the method of analyzing the dataflow statically. Then we track all definition and usage for the variables in the application. Finally, the techniques of the equivalent variable and alias analysis are introduced. We have implemented the approach of this thesis in a tool called UAFChecker which can detect use-after-free vulnerability automatically and have conducted experiments with several real-life case studies, experimental results show that the tool can detect the defects of actual application with low false positives and negatives probability.