A police search is underway for a man who was mistakenly released from a New South Wales prison two days ago.