Fix small leak in If action option parsing

This commit is contained in:
Mikael Magnusson 2010-10-10 00:51:36 +02:00 committed by Dana Jansens
parent 95535e8623
commit 74f7f35b59

View file

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