usb-host-native-utc causes heap-use-after-free on TM1
TZ_BUILD_PROJECT=SAN:Tizen:5.5:Unified:ASAN
TZ_BUILD_ID=san-tizen-5.5-unified-asan_20190805.2
=================================================================
==usb-host-native-utc==18542==ERROR: AddressSanitizer: heap-use-after-free on address 0xb03c1b64 at pc 0xb6884ed7 bp 0xbeafadfc sp 0xbeafadf4
READ of size 4 at 0xb03c1b64 thread T0
Change-Id: Ie4d22cff031a173b145d85df07f75c56fb3b5f9c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
ret = usb_host_ref_device(dev);
assert_eq_supp(ret, USB_HOST_ERROR_NONE);
+ ret = usb_host_unref_device(dev);
+ assert_eq_supp(ret, USB_HOST_ERROR_NONE);
+
return 0;
}
{
int ret;
+ ret = usb_host_ref_device(dev);
+ assert_eq_supp(ret, USB_HOST_ERROR_NONE);
+
ret = usb_host_unref_device(dev);
assert_eq_supp(ret, USB_HOST_ERROR_NONE);