The attached patch fixes some issues found by the coverity checker. NULL derefs
and a leak.
Created attachment 5958 [details] [review]
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