aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-08-19 04:47:06 +0100
committerRobert Bragg <robert@linux.intel.com>2010-12-09 22:46:47 +0000
commitaf87de80a4444f21150066ff4ee3caa5709e6591 (patch)
tree62489a115bcc84f707ddb214fcce090d6a3ab619
parentea84bd26d72ae05bfa9aef2cc8000919421641be (diff)
downloadlibmatchboxwm2-af87de80a4444f21150066ff4ee3caa5709e6591.tar.gz
libmatchboxwm2-af87de80a4444f21150066ff4ee3caa5709e6591.tar.bz2
libmatchboxwm2-af87de80a4444f21150066ff4ee3caa5709e6591.zip
fix: switch to g_list to avoid using free()
This fixes some crashes due to lists now being based on the glib slice allocated but the previous matchbox list API just used malloc/free. There were some places in matchbox where we were using free() to free links of a list, but now we need to use g_list_free_1.
-rw-r--r--matchbox/mb-wm-client-app.c4
-rw-r--r--matchbox/mb-wm-client-desktop.c2
-rw-r--r--matchbox/mb-wm-client-dialog.c2
-rw-r--r--matchbox/mb-wm-client.c2
-rw-r--r--matchbox/mb-wm-decor.c2
-rw-r--r--matchbox/mb-wm-manager.c2
-rw-r--r--matchbox/mb-wm-object.c2
-rw-r--r--matchbox/mb-wm-theme-xml.c4
-rw-r--r--matchbox/mb-wm-theme.c4
9 files changed, 12 insertions, 12 deletions
diff --git a/matchbox/mb-wm-client-app.c b/matchbox/mb-wm-client-app.c
index 8b98db2..2b16936 100644
--- a/matchbox/mb-wm-client-app.c
+++ b/matchbox/mb-wm-client-app.c
@@ -175,7 +175,7 @@ mb_wm_client_app_request_geometry (MBWindowManagerClient *client,
return True; /* Geometry accepted */
}
-
+
return False;
}
@@ -190,7 +190,7 @@ mb_wm_client_app_theme_change (MBWindowManagerClient *client)
GList * n = l->next;
mb_wm_object_unref (MB_WM_OBJECT (d));
- free (l);
+ g_list_free_1 (l);
l = n;
}
diff --git a/matchbox/mb-wm-client-desktop.c b/matchbox/mb-wm-client-desktop.c
index 2219f30..56b4e3b 100644
--- a/matchbox/mb-wm-client-desktop.c
+++ b/matchbox/mb-wm-client-desktop.c
@@ -155,7 +155,7 @@ mb_wm_client_desktop_theme_change (MBWindowManagerClient *client)
GList * n = l->next;
mb_wm_object_unref (MB_WM_OBJECT (d));
- free (l);
+ g_list_free_1 (l);
l = n;
}
diff --git a/matchbox/mb-wm-client-dialog.c b/matchbox/mb-wm-client-dialog.c
index aae490d..3bf2f04 100644
--- a/matchbox/mb-wm-client-dialog.c
+++ b/matchbox/mb-wm-client-dialog.c
@@ -317,7 +317,7 @@ mb_wm_client_dialog_theme_change (MBWindowManagerClient *client)
GList * n = l->next;
mb_wm_object_unref (MB_WM_OBJECT (d));
- free (l);
+ g_list_free_1 (l);
l = n;
}
diff --git a/matchbox/mb-wm-client.c b/matchbox/mb-wm-client.c
index 13c1964..256867c 100644
--- a/matchbox/mb-wm-client.c
+++ b/matchbox/mb-wm-client.c
@@ -99,7 +99,7 @@ mb_wm_client_destroy (MBWMObject *obj)
l = l->next;
- free (l2);
+ g_list_free_1 (l2);
}
}
diff --git a/matchbox/mb-wm-decor.c b/matchbox/mb-wm-decor.c
index 74bf664..fbb8244 100644
--- a/matchbox/mb-wm-decor.c
+++ b/matchbox/mb-wm-decor.c
@@ -636,7 +636,7 @@ mb_wm_decor_destroy (MBWMObject* obj)
GList * old = l;
mb_wm_object_unref (MB_WM_OBJECT (l->data));
l = l->next;
- free (old);
+ g_list_free_1 (old);
}
if (decor->press_cb_id)
diff --git a/matchbox/mb-wm-manager.c b/matchbox/mb-wm-manager.c
index 1a110ab..082bfcf 100644
--- a/matchbox/mb-wm-manager.c
+++ b/matchbox/mb-wm-manager.c
@@ -1018,7 +1018,7 @@ mb_wm_manager_remove_event_handler (MBWMManager *wm,
next->prev = prev;
free (info);
- free (l);
+ g_list_free_1 (l);
return;
}
diff --git a/matchbox/mb-wm-object.c b/matchbox/mb-wm-object.c
index 373841e..e6889dc 100644
--- a/matchbox/mb-wm-object.c
+++ b/matchbox/mb-wm-object.c
@@ -358,7 +358,7 @@ mb_wm_object_signal_disconnect (MBWMObject *obj,
mb_wm_object_unref (MB_WM_OBJECT (info->data));
free (info);
- free (item);
+ g_list_free_1 (item);
return;
}
diff --git a/matchbox/mb-wm-theme-xml.c b/matchbox/mb-wm-theme-xml.c
index 6407653..49562d4 100644
--- a/matchbox/mb-wm-theme-xml.c
+++ b/matchbox/mb-wm-theme-xml.c
@@ -66,7 +66,7 @@ mb_wm_xml_decor_free (MBWMXmlDecor * d)
MBWMXmlButton * b = l->data;
GList * n = l->next;
mb_wm_xml_button_free (b);
- free (l);
+ g_list_free_1 (l);
l = n;
}
@@ -104,7 +104,7 @@ mb_wm_xml_client_free (MBWMXmlClient * c)
MBWMXmlDecor * d = l->data;
GList * n = l->next;
mb_wm_xml_decor_free (d);
- free (l);
+ g_list_free_1 (l);
l = n;
}
diff --git a/matchbox/mb-wm-theme.c b/matchbox/mb-wm-theme.c
index 91e112c..c7a8921 100644
--- a/matchbox/mb-wm-theme.c
+++ b/matchbox/mb-wm-theme.c
@@ -97,7 +97,7 @@ mb_wm_theme_destroy (MBWMObject *obj)
MBWMXmlClient * c = l->data;
GList * n = l->next;
mb_wm_xml_client_free (c);
- free (l);
+ g_list_free_1 (l);
l = n;
}
@@ -861,7 +861,7 @@ xml_stack_free (GList *stack)
{
GList * n = l->next;
free (l->data);
- free (l);
+ g_list_free_1 (l);
l = n;
}