Former One Direction star Zayn Malik has shared a new song with his fans after "unprofessionalism" led to it leaking online.