In this paper, we investigate the average secrecy capacity (ASC) performance of a mixed radio frequency (RF)/free space optical (FSO) communication system which RF and the FSO channels experience Nakagami-m fading and Malaga turbulence, respectively. More precisely, by considering the heterodyne detection, the intensity modulation with direct detection techniques and the pointing errors, we derive an exact closed-form expression for the ASC metric to analyze the secrecy performance of considered mixed RF/FSO variable gain relaying system.