This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch feat/e-wl-proxy-planb
in repository enlightenment.

View the commit online.

commit fc6e37f0c76ea76dcb19c6ff17e6e62d970990c8
Author: Carsten Haitzler <[email protected]>
AuthorDate: Wed Jun 10 11:23:59 2026 +0100

    nm - handle a manager being freed while we have pending probes
---
 src/modules/networkmanager/e_networkmanager.c | 18 ++++++++++++++++++
 src/modules/networkmanager/e_networkmanager.h |  1 +
 2 files changed, 19 insertions(+)

diff --git a/src/modules/networkmanager/e_networkmanager.c b/src/modules/networkmanager/e_networkmanager.c
index 5f4ee1df9..6d62b6580 100644
--- a/src/modules/networkmanager/e_networkmanager.c
+++ b/src/modules/networkmanager/e_networkmanager.c
@@ -1507,6 +1507,15 @@ _active_conn_probe_cb(void *data, const Eldbus_Message *msg,
    const char *ap_path = NULL, *ip4path = NULL, *type_str = NULL;
    enum NM_Device_Type conn_type;
 
+   /* The manager was freed while we probed */
+   if (!nm)
+     {
+        _active_conn_probe_free(probe);
+        return;
+     }
+   /* Remove probes from the manager */
+   nm->pending_probes = eina_list_remove(nm->pending_probes, probe);
+
    /* Discard stale probes that were superseded by a newer batch */
    if (probe->generation != nm->probe_generation)
      {
@@ -1621,6 +1630,8 @@ _manager_probe_active_conn(struct NM_Manager *nm,
    probe->obj = eldbus_object_get(conn, NM_BUS_NAME, active_conn_path);
    probe->proxy = eldbus_proxy_get(probe->obj, NM_IFACE_PROPS);
 
+   nm->pending_probes = eina_list_append(nm->pending_probes, probe);
+
    eldbus_proxy_call(probe->proxy, "GetAll",
                      _active_conn_probe_cb, probe,
                      -1, "s", NM_IFACE_ACTIVE_CONN);
@@ -2480,9 +2491,16 @@ _manager_free(struct NM_Manager *nm)
 {
    struct NM_Device *dev;
    Eldbus_Object *obj;
+    struct _Active_Conn_Probe *probe;
 
    if (!nm) return;
 
+   /* Flag pending probes to not belong ti this manager */
+   EINA_LIST_FREE(nm->pending_probes, probe)
+     {
+        probe->nm = NULL;
+     }
+
    /* Invalidate in-flight saved-connection probes before freeing anything.
     * Both _saved_conn_list_cb and _saved_conn_settings_cb check this field
     * and will bail out cleanly without touching the freed NM_Manager. */
diff --git a/src/modules/networkmanager/e_networkmanager.h b/src/modules/networkmanager/e_networkmanager.h
index d27e26c67..4142deb19 100644
--- a/src/modules/networkmanager/e_networkmanager.h
+++ b/src/modules/networkmanager/e_networkmanager.h
@@ -320,6 +320,7 @@ struct NM_Manager
 
    Eina_List     *vpn_pending_autoconn;  /* _autoconn_ctx* per in-flight nmcli connection modify */
 
+   Eina_List     *pending_probes; /* Pending struct _Active_Conn_Probe's */
    /* Generation counter incremented each time a new batch of active-connection
     * probes is started.  Each probe captures the generation at creation time
     * and discards its result in the callback if the generation has advanced,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to