Sfoglia il codice sorgente

Remove invalid free in ua_subscription_events

Ari 6 anni fa
parent
commit
41105664f9
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/server/ua_subscription_events.c

+ 2 - 1
src/server/ua_subscription_events.c

@@ -28,7 +28,8 @@ UA_MonitoredItem_removeNodeEventCallback(UA_Server *server, UA_Session *session,
             UA_MonitoredItem *iter = ((UA_ObjectNode *) node)->monitoredItemQueue;
             for (; iter->next != entry; iter=iter->next) {}
             iter->next = entry->next;
-            UA_free(entry);
+            /* Unlike SLIST_REMOVE, do not free the entry, since it
+             * is still being worked on in the calling function */
             break;
         }
     }