A couple of fixes from this weeks coverity scan.

One is a resource leak that was introduced this week.

The other looks like it's been there a while, suggesting something in my linux build has changed, as it also noted a few new items in xrandr code.