[UTC][Non-ACR][capi-media-radio] Fix ASAN bug 85/244085/2
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 15 Sep 2020 03:02:33 +0000 (12:02 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 15 Sep 2020 05:52:40 +0000 (14:52 +0900)
Change-Id: I9ff074483b0eed06a9f9d2505f4d1e91b68fcb93

src/utc/radio/utc-media-radio.c

index 56a02816d23d0e74cbc9e48696891bfb511a19df..e0dc88755b5152f2adf063150954f56063efe1ab 100755 (executable)
@@ -85,8 +85,10 @@ void utc_media_radio_startup(void)
  */
 void utc_media_radio_cleanup(void)
 {
-       if (radio)
+       if (radio) {
                radio_destroy(radio);
+               radio = NULL;
+       }
 }
 
 /**
@@ -766,6 +768,7 @@ int utc_media_radio_destroy_p(void)
        } else {
                ret = radio_destroy(radio);
                assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+               radio = NULL;
        }
        return 0;
 }