[tool] Reinitialize handles to NULL after tethering_destroy() call 78/243178/2 accepted/tizen/unified/20200914.131323 submit/tizen/20200914.011423
authorNishant Chaprana <n.chaprana@samsung.com>
Thu, 3 Sep 2020 17:31:06 +0000 (23:01 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Thu, 3 Sep 2020 17:47:07 +0000 (23:17 +0530)
Change-Id: Id314b11874dbf36c60c790dc435174b0288f20b7
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
tools/tethering_test.c

index 5b8bb8c..ba522c7 100755 (executable)
@@ -715,6 +715,16 @@ static int test_tethering_destroy(void)
                printf("Tethering destroy is failed\n");
                return -1;
        }
+       th = NULL;
+
+       __deregister_cbs(th5);
+
+       ret = tethering_destroy(th5);
+       if (__is_err(ret) == true) {
+               printf("Tethering destroy is failed\n");
+               return -1;
+       }
+       th5 = NULL;
 
        return 1;
 }