Lines 157-163
void uevent_handler()
Link Here
|
157 |
|
157 |
|
158 |
struct uevent *ev = uevent_new(buf, len); |
158 |
struct uevent *ev = uevent_new(buf, len); |
159 |
if (ev) { |
159 |
if (ev) { |
160 |
for (GList *l = notifiers; l; l = l->next) { |
160 |
/* we might remove elements in the callback so a copy is needed */ |
|
|
161 |
GList *list = g_list_copy(notifiers); |
162 |
|
163 |
for (GList *l = list; l; l = l->next) { |
161 |
struct uevent_notify *nb = l->data; |
164 |
struct uevent_notify *nb = l->data; |
162 |
|
165 |
|
163 |
if (!(ev->action & nb->action)) |
166 |
if (!(ev->action & nb->action)) |
Lines 169-174
void uevent_handler()
Link Here
|
169 |
nb->cb(ev, nb->userdata); |
172 |
nb->cb(ev, nb->userdata); |
170 |
} |
173 |
} |
171 |
|
174 |
|
|
|
175 |
g_list_free(list); |
172 |
uevent_free(ev); |
176 |
uevent_free(ev); |
173 |
} |
177 |
} |
174 |
} |
178 |
} |