Police complaint leads to inspector being sacked