Skip to content

Commit

Permalink
Merge pull request eclipse-wakaama#338 from Saku2/master
Browse files Browse the repository at this point in the history
Avoid accessing freed memory when deleting object
  • Loading branch information
dnav committed Nov 6, 2017
2 parents 238b451 + b532b0e commit f854a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,11 @@ uint8_t object_delete(lwm2m_context_t * contextP,
while (NULL != instanceP
&& result == COAP_202_DELETED)
{
uriP->instanceId = instanceP->id;
result = objectP->deleteFunc(instanceP->id, objectP);
if (result == COAP_202_DELETED)
{
uriP->flag |= LWM2M_URI_FLAG_INSTANCE_ID;
uriP->instanceId = instanceP->id;
observe_clear(contextP, uriP);
uriP->flag &= ~LWM2M_URI_FLAG_INSTANCE_ID;
}
Expand Down

0 comments on commit f854a15

Please sign in to comment.