The attached patch fixes some issues found by the coverity checker. NULL derefs and a leak.
Created attachment 5958 [details] [review] proposed patch
For future reference, the xlibs CVS is completely dead. If you're going to make a patch, please do it against Xorg CVS. (In this case, the patch seems to still be valid for Xorg CVS, since it hasn't changed much since the move from xlibs.)
applied, thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.