From 62108c86f3a092ea38ba091bf6e60a0e51b15891 Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Thu, 3 Sep 2020 23:01:06 +0530 Subject: [PATCH] [tool] Reinitialize handles to NULL after tethering_destroy() call Change-Id: Id314b11874dbf36c60c790dc435174b0288f20b7 Signed-off-by: Nishant Chaprana --- tools/tethering_test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/tethering_test.c b/tools/tethering_test.c index 5b8bb8c..ba522c7 100755 --- a/tools/tethering_test.c +++ b/tools/tethering_test.c @@ -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; } -- 2.7.4