Pārlūkot izejas kodu

Memory leak in UA_Subscription_deleteMembers

UA_Subscription_deleteMembers want to Delete unpublished Notifications.

UA_Subscription_deleteMembers call LIST_REMOVE and after Subscription_deleteUnpublishedNotification. But Subscription_deleteUnpublishedNotification use the list to Delete unpublished Notifications and "not" are never freed.
StalderT 9 gadi atpakaļ
vecāks
revīzija
097f693ab7
1 mainītis faili ar 0 papildinājumiem un 1 dzēšanām
  1. 0 1
      src/server/ua_subscription.c

+ 0 - 1
src/server/ua_subscription.c

@@ -37,7 +37,6 @@ void UA_Subscription_deleteMembers(UA_Subscription *subscription, UA_Server *ser
     
     // Delete unpublished Notifications
     LIST_FOREACH_SAFE(not, &subscription->unpublishedNotifications, listEntry, tmp_not) {
-        LIST_REMOVE(not, listEntry);
         Subscription_deleteUnpublishedNotification(not->notification->sequenceNumber, subscription);
     }