This paper studies the physical layer security of an unmanned aerial vehicle (UAV) network, where a UAV base station (UAV-B) transmits confidential information to multiple information receivers (IRs) with the aid of a UAV jammer (UAV-J) in the presence of multiple eavesdroppers. We formulate an optimization problem to jointly design the trajectories and transmit power of UAV-B and UAV-J in order to maximize the minimum average secrecy rate over all IRs. The optimization problem is non-convex and the optimization variables are coupled, which leads to the optimization problem being mathematically intractable. As such, we decompose the optimization problem into two subproblems and then solve it by employing an alternating iterative algorithm and the successive convex approximation technique. Our results show that the average secrecy rate performance of the proposed scheme provides about 20% and 150% performance gains over the joint trajectory and transmit power optimization without UAV-J scheme and the transmit power optimization with fixed trajectory scheme at flight period T=150 s, respectively.