[fusion-commits] Compiz configuration system library: Changes to 'master' (c751e679b701513d728d0d01c3af2e9351f1696d)
onestone at server.beryl-project.org
onestone at server.beryl-project.org
Wed Jul 11 17:47:25 CEST 2007
New commits:
commit c751e679b701513d728d0d01c3af2e9351f1696d
Author: Dennis Kasprzyk <onestone at opencompositing.org>
Date: Wed Jul 11 17:47:20 2007 +0200
Added missing free's. Â
Catched by Roland Bär.
src/compiz.c | 19 +++++++++++++++++--
src/main.c | 1 +
2 files changed, 18 insertions(+), 2 deletions(-)
Modified: fusion/compizconfig/libcompizconfig/src/compiz.c
===================================================================
--- fusion/compizconfig/libcompizconfig/src/compiz.c
+++ fusion/compizconfig/libcompizconfig/src/compiz.c
@@ -83,17 +83,24 @@ getGenericNodePath (xmlNode * base)
if (!parent)
return NULL;
if (!base->name)
+ {
+ free (parent);
return strdup ("");
+ }
if (!xmlStrcmp (base->name, BAD_CAST "option"))
{
name = xmlGetProp (base, BAD_CAST "name");
if (!name)
+ {
+ free (parent);
return NULL;
+ }
if (!strlen ((char *) name))
{
xmlFree (name);
+ free (parent);
return NULL;
}
@@ -101,6 +108,7 @@ getGenericNodePath (xmlNode * base)
if (!type)
{
xmlFree (name);
+ free (parent);
return NULL;
}
@@ -108,6 +116,7 @@ getGenericNodePath (xmlNode * base)
{
xmlFree (name);
xmlFree (type);
+ free (parent);
return NULL;
}
@@ -123,11 +132,15 @@ getGenericNodePath (xmlNode * base)
{
name = xmlGetProp (base, BAD_CAST "name");
if (!name)
+ {
+ free (parent);
return NULL;
+ }
if (!strlen ((char *) name))
{
xmlFree (name);
+ free (parent);
return NULL;
}
@@ -1106,7 +1119,7 @@ addOptionForPlugin (CCSPlugin * plugin,
xmlNode * node)
{
xmlNode **nodes;
- int num;
+ int num = 0;
if (ccsFindSetting (plugin, name, isScreen, screen))
{
@@ -1200,7 +1213,6 @@ addOptionForPlugin (CCSPlugin * plugin,
default:
break;
}
- free (nodes);
}
else
{
@@ -1219,6 +1231,9 @@ addOptionForPlugin (CCSPlugin * plugin,
}
}
+ if (nodes)
+ free (nodes);
+
// printSetting (setting);
PLUGIN_PRIV (plugin);
Modified: fusion/compizconfig/libcompizconfig/src/main.c
===================================================================
--- fusion/compizconfig/libcompizconfig/src/main.c
+++ fusion/compizconfig/libcompizconfig/src/main.c
@@ -965,6 +965,7 @@ ccsCopyList (CCSSettingValueList l1, CCSSetting * setting)
sizeof (CCSSettingColorValue));
break;
default:
+ free (value);
return FALSE;
break;
}
More information about the commits
mailing list