[network-manager-applet] applet: avoid modifying the list we're iterating



commit 1e699cac885ec53a13e880da6a138b6bfb8cdcf8
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Sat Apr 23 18:59:09 2016 +0200

    applet: avoid modifying the list we're iterating
    
    applet_secrets_request_free() removes the request from the list, we must
    not proceed iterating the list.

 src/applet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 0fe14e7..6ba735b 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2904,6 +2904,7 @@ applet_agent_cancel_secrets_cb (AppletAgent *agent,
                if (req->reqid == request_id) {
                        /* cancel and free this password request */
                        applet_secrets_request_free (req);
+                       break;
                }
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]