Stability analysis of a discrete ecological model