[maemo-commits] [maemo-commits] r18439 - in projects/haf/trunk/glib/debian: . patches

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue May 19 16:51:11 EEST 2009
Author: mitch
Date: 2009-05-19 16:51:00 +0300 (Tue, 19 May 2009)
New Revision: 18439

Added:
   projects/haf/trunk/glib/debian/patches/21-gsimpleasyncresult-memleak.patch
Modified:
   projects/haf/trunk/glib/debian/changelog
   projects/haf/trunk/glib/debian/patches/series
Log:
* 21-gsimpleasyncresult-memleak.patch: new patch.
  Fixes: NB#108347 - Memory leak found while exporting all contacts from UI.



Modified: projects/haf/trunk/glib/debian/changelog
===================================================================
--- projects/haf/trunk/glib/debian/changelog	2009-05-19 13:16:49 UTC (rev 18438)
+++ projects/haf/trunk/glib/debian/changelog	2009-05-19 13:51:00 UTC (rev 18439)
@@ -5,6 +5,8 @@
   * Reorder patches/series to match patch numbers and rediff everything.
   * 20-gmarkup-speedup.patch: new patch.
     Fixes: NB#106936 - glib performance improvements patches shall be applied
+  * 21-gsimpleasyncresult-memleak.patch: new patch.
+    Fixes: NB#108347 - Memory leak found while exporting all contacts from UI.
 
  -- foo bar <foo at bar.com>  Tue, 12 May 2009 15:13:54 +0300
 

Added: projects/haf/trunk/glib/debian/patches/21-gsimpleasyncresult-memleak.patch
===================================================================
--- projects/haf/trunk/glib/debian/patches/21-gsimpleasyncresult-memleak.patch	2009-05-19 13:16:49 UTC (rev 18438)
+++ projects/haf/trunk/glib/debian/patches/21-gsimpleasyncresult-memleak.patch	2009-05-19 13:51:00 UTC (rev 18439)
@@ -0,0 +1,54 @@
+Index: glib-2.20.1/gio/gsimpleasyncresult.c
+===================================================================
+--- glib-2.20.1.orig/gio/gsimpleasyncresult.c	2009-04-01 01:04:20.000000000 +0200
++++ glib-2.20.1/gio/gsimpleasyncresult.c	2009-05-15 12:36:58.000000000 +0200
+@@ -145,6 +145,15 @@ G_DEFINE_TYPE_WITH_CODE (GSimpleAsyncRes
+ 						g_simple_async_result_async_result_iface_init))
+ 
+ static void
++clear_op_res (GSimpleAsyncResult *simple)
++{
++  if (simple->destroy_op_res)
++    simple->destroy_op_res (simple->op_res.v_pointer);
++  simple->destroy_op_res = NULL;
++  simple->op_res.v_ssize = 0;
++}
++
++static void
+ g_simple_async_result_finalize (GObject *object)
+ {
+   GSimpleAsyncResult *simple;
+@@ -154,8 +163,7 @@ g_simple_async_result_finalize (GObject 
+   if (simple->source_object)
+     g_object_unref (simple->source_object);
+ 
+-  if (simple->destroy_op_res)
+-    simple->destroy_op_res (simple->op_res.v_pointer);
++  clear_op_res (simple);
+ 
+   if (simple->error)
+     g_error_free (simple->error);
+@@ -375,6 +383,7 @@ g_simple_async_result_set_op_res_gpointe
+ {
+   g_return_if_fail (G_IS_SIMPLE_ASYNC_RESULT (simple));
+ 
++  clear_op_res (simple);
+   simple->op_res.v_pointer = op_res;
+   simple->destroy_op_res = destroy_op_res;
+ }
+@@ -407,6 +416,7 @@ g_simple_async_result_set_op_res_gssize 
+                                          gssize              op_res)
+ {
+   g_return_if_fail (G_IS_SIMPLE_ASYNC_RESULT (simple));
++  clear_op_res (simple);
+   simple->op_res.v_ssize = op_res;
+ }
+ 
+@@ -437,6 +447,7 @@ g_simple_async_result_set_op_res_gboolea
+                                            gboolean            op_res)
+ {
+   g_return_if_fail (G_IS_SIMPLE_ASYNC_RESULT (simple));
++  clear_op_res (simple);
+   simple->op_res.v_boolean = !!op_res;
+ }
+ 

Modified: projects/haf/trunk/glib/debian/patches/series
===================================================================
--- projects/haf/trunk/glib/debian/patches/series	2009-05-19 13:16:49 UTC (rev 18438)
+++ projects/haf/trunk/glib/debian/patches/series	2009-05-19 13:51:00 UTC (rev 18439)
@@ -1,4 +1,5 @@
 20-gmarkup-speedup.patch
+21-gsimpleasyncresult-memleak.patch
 25-gatomic.patch
 30-gfileutils.patch
 35-gmessages.patch


More information about the maemo-commits mailing list