diff --git a/src/xcb/wm-extension.c b/src/xcb/wm-extension.c index f2c1808..6e5efb8 100644 --- a/src/xcb/wm-extension.c +++ b/src/xcb/wm-extension.c @@ -182,14 +182,16 @@ bool get_window_tag(xcb_window_t window, client_tag_info_t *client_info) { XCB_ATOM_CARDINAL, 0, 2); xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie, NULL); int length = xcb_get_property_value_length(reply); - if (length >= 2) { + bool result = length >= 2; + if (result) { uint32_t *data = xcb_get_property_value(reply); client_info->tags = data[0]; client_info->monitor_index = data[1]; - return true; - } else { - return false; } + + free(reply); + + return result; } void set_window_tag(xcb_window_t window, client_tag_info_t *client_info) {