Skip to content

Commit

Permalink
[BUGFIX] SubscriptionResumptionStorage SubscriptionInfo SetEventPath …
Browse files Browse the repository at this point in the history
…and SetAttributePath tries to Calloc(0) (#24982)
  • Loading branch information
jtung-apple authored and pull[bot] committed Feb 16, 2024
1 parent 59be658 commit cd4931c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/SubscriptionResumptionStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ class SubscriptionResumptionStorage
CHIP_ERROR SetAttributePaths(const ObjectList<AttributePathParams> * pAttributePathList)
{
mAttributePaths.Free();
if (!pAttributePathList)
{
return CHIP_NO_ERROR;
}
const ObjectList<AttributePathParams> * attributePath = pAttributePathList;
size_t attributePathCount = 0;
while (attributePath)
Expand All @@ -102,6 +106,10 @@ class SubscriptionResumptionStorage
CHIP_ERROR SetEventPaths(const ObjectList<EventPathParams> * pEventPathList)
{
mEventPaths.Free();
if (!pEventPathList)
{
return CHIP_NO_ERROR;
}
const ObjectList<EventPathParams> * eventPath = pEventPathList;
size_t eventPathCount = 0;
while (eventPath)
Expand Down

0 comments on commit cd4931c

Please sign in to comment.