usb-gadget: make variable null after free 15/275815/2
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 2 Jun 2022 06:30:19 +0000 (15:30 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Thu, 2 Jun 2022 06:41:54 +0000 (15:41 +0900)
commitb1d0ee71af97e00971be70be6b8dd59f77f470ae
treeec46d6eb98b9eee3b6708999f414c80718913a26
parentc66bec1b27f8d261b8beffa84a1b32d8c8b1fc70
usb-gadget: make variable null after free

The SIGABRT(heap-use-after-free) was raised. It happened rarely when
the sdb is re-enabled after disabled due to unstable envrionment.
(But it is unclear what the unstable envrionment is.) To prevent this,
make a variable null after freeing it.

Change-Id: I2218004bf2069d6f8a6c835ba8883ece22f9c75b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/usb-gadget/usb-gadget-cfs-ops.c