If that 3rd year has only a small amount of guaranteed money, I am okay with Chicago doing this. Limited options to improving their squad so keeping a decent role player is probably best. Not rebuilding. Need to be in a win-now mode with Rose (injuries), Noah (starting to get old) and Pau Gasol (old).
If not, I think 3 years for a player who will turn 35 in a two months time is too much money for a limited role player like Dunleavy. I thought Dunleavy showed quite a bit of decline last year and was becoming increasingly easy to exploit defensively.