Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iotivity-lite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IoTivity
iotivity-lite
Commits
7c50703a
Commit
7c50703a
authored
Apr 23, 2020
by
Kishen Maloor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oc_obt:avoid double-freeing of discovery callback
Signed-off-by:
Kishen Maloor
<
kishen.maloor@intel.com
>
parent
23da3c03
Pipeline
#725
passed with stage
in 13 minutes and 9 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
security/oc_obt.c
security/oc_obt.c
+6
-4
No files found.
security/oc_obt.c
View file @
7c50703a
...
...
@@ -375,8 +375,10 @@ static oc_event_callback_retval_t
free_discovery_cb
(
void
*
data
)
{
oc_discovery_cb_t
*
c
=
(
oc_discovery_cb_t
*
)
data
;
oc_list_remove
(
oc_discovery_cbs
,
c
);
oc_memb_free
(
&
oc_discovery_s
,
c
);
if
(
is_item_in_list
(
oc_discovery_cbs
,
c
))
{
oc_list_remove
(
oc_discovery_cbs
,
c
);
oc_memb_free
(
&
oc_discovery_s
,
c
);
}
return
OC_EVENT_DONE
;
}
...
...
@@ -2699,10 +2701,10 @@ oc_obt_shutdown(void)
oc_memb_free
(
&
oc_devices_s
,
device
);
device
=
(
oc_device_t
*
)
oc_list_pop
(
oc_devices
);
}
oc_discovery_cb_t
*
cb
=
(
oc_discovery_cb_t
*
)
oc_list_
pop
(
oc_discovery_cbs
);
oc_discovery_cb_t
*
cb
=
(
oc_discovery_cb_t
*
)
oc_list_
head
(
oc_discovery_cbs
);
while
(
cb
)
{
free_discovery_cb
(
cb
);
cb
=
(
oc_discovery_cb_t
*
)
oc_list_
pop
(
oc_discovery_cbs
);
cb
=
(
oc_discovery_cb_t
*
)
oc_list_
head
(
oc_discovery_cbs
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment