HarveyHunt / howm

A lightweight, X11 tiling window manager that behaves like vim
GNU General Public License v2.0
649 stars 24 forks source link

Do not free reply on error. #35

Closed Reisen closed 9 years ago

Reisen commented 9 years ago

When running some X windows, in my case xev, xcb_icccm_get_wm_class_reply will fail, but howm will still call a clean up function to clean it up which causes howm to crash. For some reason, the function call also doesn't reseat an xcb_generic_err_t in my tests so I can't pinpoint what causes this either.

Checking the icccm source though, it seems simply not cleaning up the structure should suffice to fix the problem as the error occurs due to the wipe function calling free here. If the get_wm_class_reply function fails, free is automatically called anyway so there is no harm in leaving the reply struct dirty.

HarveyHunt commented 9 years ago

Thanks for this PR and the nice explanation too, I'll merge this now.

xev looks cool- I don't think I have used it before.