summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-client.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-10-03 09:57:01 -0400
committerDan Winship <danw@gnome.org>2013-10-03 11:04:45 -0400
commitcbe261caa24f9f58fd28cd20a811952068d7f8d2 (patch)
treedad5f2c9256574860679b367e3a81bdfea18c55d /libnm-glib/nm-client.c
parent28e67c7d73e9064b6588e4e893ae9db9d76d665d (diff)
libnm: more valgrinding fixes
Diffstat (limited to 'libnm-glib/nm-client.c')
-rw-r--r--libnm-glib/nm-client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index ddde49a62..44fb24dc7 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -501,7 +501,7 @@ static void
recheck_pending_activations (NMClient *self, const char *failed_path, GError *error)
{
NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (self);
- GSList *iter;
+ GSList *iter, *next;
const GPtrArray *active_connections;
gboolean found_in_active = FALSE;
gboolean found_in_pending = FALSE;
@@ -516,9 +516,11 @@ recheck_pending_activations (NMClient *self, const char *failed_path, GError *er
* If the connection to activate doesn't make it to active_connections,
* due to an error, we have to call the callback for failed_path.
*/
- for (iter = priv->pending_activations; iter; iter = g_slist_next (iter)) {
+ for (iter = priv->pending_activations; iter; iter = next) {
ActivateInfo *info = iter->data;
+ next = g_slist_next (iter);
+
if (!found_in_pending && failed_path && g_strcmp0 (failed_path, info->active_path) == 0) {
found_in_pending = TRUE;
ainfo = info;