A check of the validity of the distance-duality relation (DDR) is necessary since a violation of one of the assumptions underlying this relation might be possible. In this paper, we test the DDR by combining the Union2.1 type Ia supernovae (SNIa) and five angular diameter distance data from the baryonic acoustic oscillation (BAO) measurements. We find that the DDR is consistent with the observations at the $2\ensuremath{\sigma}$ confidence level (CL) for the case of the Hubble constant $h=0.7$, and the consistency is improved to be $1\ensuremath{\sigma}$ CL when $h=0.7$ is replaced by the latest constraint from the Planck satellite, i.e., $h=0.678$, or $h$ is marginalized. Our results show that the BAO measurement is a very powerful tool to test the DDR. With more and more BAO data being released in the future, we are expecting a better validity check of the DDR.