projects
/
platform
/
core
/
system
/
initrd-flash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3daf5a4
)
interface: Disconnect an only existing connected interface
61/297761/1
author
Seung-Woo Kim
<sw0312.kim@samsung.com>
Thu, 24 Aug 2023 02:23:00 +0000
(11:23 +0900)
committer
Seung-Woo Kim
<sw0312.kim@samsung.com>
Thu, 24 Aug 2023 02:29:49 +0000
(11:29 +0900)
Disconnect an only existing connected interface.
The interface can be already disconnected and it causes double
free during tfm_interface_exit().
Change-Id: I5cc23daf9d4fbf7cb909f9c07a5eaea59e99a476
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/interface.c
patch
|
blob
|
history
diff --git
a/src/interface.c
b/src/interface.c
index
581a8e1
..
2c8cd2e
100644
(file)
--- a/
src/interface.c
+++ b/
src/interface.c
@@
-289,7
+289,8
@@
void tfm_interface_exit(struct tfm_interface_context *ictx)
if (!ictx)
return;
- tfm_interface_disconnect(ictx->connected);
+ if (ictx->connected)
+ tfm_interface_disconnect(ictx->connected);
destroy_interface_list(ictx);
free(ictx);
}