Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check replies separately
[spectrwm.git]
/
spectrwm.c
diff --git
a/spectrwm.c
b/spectrwm.c
index
c674051
..
5f25088
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-820,7
+820,9
@@
teardown_ewmh(void)
pc = xcb_get_property(conn, 0, screens[i].root, sup_check,
XCB_ATOM_WINDOW, 0, 1);
pr = xcb_get_property_reply(conn, pc, NULL);
pc = xcb_get_property(conn, 0, screens[i].root, sup_check,
XCB_ATOM_WINDOW, 0, 1);
pr = xcb_get_property_reply(conn, pc, NULL);
- if (pr && pr->format == sup_check) {
+ if (!pr)
+ continue;
+ if (pr->format == sup_check) {
id = *((xcb_window_t *)xcb_get_property_value(pr));
xcb_destroy_window(conn, id);
id = *((xcb_window_t *)xcb_get_property_value(pr));
xcb_destroy_window(conn, id);
@@
-2299,8
+2301,10
@@
find_window(xcb_window_t id)
return (NULL);
/* if we were looking for the parent return that window instead */
return (NULL);
/* if we were looking for the parent return that window instead */
- if (r->parent == 0 || r->root == r->parent)
+ if (r->parent == 0 || r->root == r->parent) {
+ free(r);
return (NULL);
return (NULL);
+ }
/* look for parent */
for (i = 0; i < num_screens; i++)
/* look for parent */
for (i = 0; i < num_screens; i++)
@@
-6420,7
+6424,9
@@
get_ws_idx(xcb_window_t id)
xcb_get_property(conn, 0, id, a_swm_ws,
XCB_ATOM_STRING, 0, SWM_PROPLEN),
NULL);
xcb_get_property(conn, 0, id, a_swm_ws,
XCB_ATOM_STRING, 0, SWM_PROPLEN),
NULL);
- if (gpr && gpr->type) {
+ if (!gpr)
+ return (-1);
+ if (gpr->type) {
proplen = xcb_get_property_value_length(gpr);
if (proplen > 0) {
prop = malloc(proplen + 1);
proplen = xcb_get_property_value_length(gpr);
if (proplen > 0) {
prop = malloc(proplen + 1);