a dog in the manger
someone who keeps something that they do not really want in order to prevent anyone else from having it.
Stop being such a dog in the manger and let your sister ride your bike if you're not using it.
Cambridge English Idioms Dictionary