Free some memory
Check for null before freeing X11info, removed free current resource
Merge branch 'memleak'