all repos — openbox @ 74f7f35b59ce395c17fa823660a480dd94c6077c

openbox fork - make it a bit more like ryudo

Fix small leak in If action option parsing
Mikael Magnusson mikachu@gmail.com
commit

74f7f35b59ce395c17fa823660a480dd94c6077c

parent

95535e86237e6c89935eb7563f37f13474c466f2

1 files changed, 10 insertions(+), 7 deletions(-)

jump to
M openbox/actions/if.copenbox/actions/if.c

@@ -98,13 +98,16 @@ else

o->decor_on = TRUE; } if ((n = obt_xml_find_node(node, "desktop"))) { - gchar *s = obt_xml_node_string(n); - if (!g_ascii_strcasecmp(s, "current")) - o->desktop_current = TRUE; - if (!g_ascii_strcasecmp(s, "other")) - o->desktop_other = TRUE; - else - o->desktop_number = atoi(s); + gchar *s; + if ((s = obt_xml_node_string(n))) { + if (!g_ascii_strcasecmp(s, "current")) + o->desktop_current = TRUE; + if (!g_ascii_strcasecmp(s, "other")) + o->desktop_other = TRUE; + else + o->desktop_number = atoi(s); + g_free(s); + } } if ((n = obt_xml_find_node(node, "omnipresent"))) { if (obt_xml_node_bool(n))