Fix analyzer issues

@jverkoey This is a patch for a leak in release 1.1 that is picked up by the static analyzer in Xcode 6. I see that you've done some additional work since 1.1 that hasn't been released yet, but this was a straightforward fix that seems like a good candidate for a patch release. Also, since the most recent unreleased work is already on master, there's no good destination for this pull request, but I wanted to open one anyway to see if we can get these changes incorporated somehow.