~network-manager/network-manager/ubuntu.hardy.07

« back to all changes in this revision

Viewing changes to debian/patches/80_lp259503_access_to_freed_device_struct.patch

* merge 0.7~~svn20080905t025540+eni0 snapshot to hardy branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=== modified file 'src/nm-device-wifi.c'
 
2
---
 
3
 src/nm-device-ethernet.c |    4 ++--
 
4
 src/nm-device-wifi.c     |    4 ++--
 
5
 2 files changed, 4 insertions(+), 4 deletions(-)
 
6
 
 
7
Index: network-manager.07.ubuntu/src/nm-device-wifi.c
 
8
===================================================================
 
9
--- network-manager.07.ubuntu.orig/src/nm-device-wifi.c
 
10
+++ network-manager.07.ubuntu/src/nm-device-wifi.c
 
11
@@ -2097,21 +2097,21 @@
 
12
 
 
13
        cb_data = g_slice_new0 (struct state_cb_data);
 
14
        if (cb_data == NULL) {
 
15
                nm_warning ("Not enough memory to process supplicant manager state"
 
16
                            " change.");
 
17
                return FALSE;
 
18
        }
 
19
 
 
20
-       cb_data->self = self;
 
21
+       cb_data->self = g_object_ref (self);
 
22
        cb_data->new_state = new_state;
 
23
        cb_data->old_state = old_state;
 
24
 
 
25
-       g_idle_add (handler, cb_data);
 
26
+       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, handler, cb_data, g_object_unref);
 
27
 
 
28
        return TRUE;
 
29
 }
 
30
 
 
31
 static gboolean
 
32
 supplicant_iface_state_cb_handler (gpointer user_data)
 
33
 {
 
34
        struct state_cb_data *cb_data = (struct state_cb_data *) user_data;
 
35
Index: network-manager.07.ubuntu/src/nm-device-ethernet.c
 
36
===================================================================
 
37
--- network-manager.07.ubuntu.orig/src/nm-device-ethernet.c
 
38
+++ network-manager.07.ubuntu/src/nm-device-ethernet.c
 
39
@@ -766,21 +766,21 @@
 
40
                         guint32 old_state)
 
41
 {
 
42
        struct state_cb_data * cb_data;
 
43
 
 
44
        if (new_state == old_state)
 
45
                return TRUE;
 
46
 
 
47
        cb_data = g_slice_new0 (struct state_cb_data);
 
48
-       cb_data->self = self;
 
49
+       cb_data->self = g_object_ref(self);
 
50
        cb_data->new_state = new_state;
 
51
        cb_data->old_state = old_state;
 
52
 
 
53
-       g_idle_add (handler, cb_data);
 
54
+       g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, handler, cb_data, g_object_unref);
 
55
 
 
56
        return TRUE;
 
57
 }
 
58
 
 
59
 static gboolean
 
60
 supplicant_mgr_state_cb_handler (gpointer user_data)
 
61
 {
 
62
        struct state_cb_data *info = (struct state_cb_data *) user_data;