Browse Source

Events: Fix a memleak where the same field is overwritten

Julius Pfrommer 6 years ago
parent
commit
de85ad4e93
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/server/ua_subscription.c

+ 2 - 0
src/server/ua_subscription.c

@@ -194,6 +194,8 @@ Events_moveNotificationsFromMonitoredItems(UA_Server *server, UA_Subscription *s
         UA_EventFilterResult_deleteMembers(&notification->data.event.result); */
         UA_EventFieldList_deleteMembers(&notification->data.event.fields);
         UA_free(notification);
+
+        pos++; /* Increase the index */
     }
 }
 #endif