From 0675f8c3cfe28da93cbeab13677f0876617ed337 Mon Sep 17 00:00:00 2001 From: Cheoleun Moon Date: Thu, 2 Apr 2020 12:21:24 +0900 Subject: [PATCH] Unset the terminated callback before free --- test/wifi-aware-publish-test.c | 2 +- test/wifi-aware-subscribe-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/wifi-aware-publish-test.c b/test/wifi-aware-publish-test.c index 39e34f1..3a57ab7 100644 --- a/test/wifi-aware-publish-test.c +++ b/test/wifi-aware-publish-test.c @@ -389,8 +389,8 @@ static void __session_terminated_cb(wifi_aware_session_h session, printf("reason: %d\n", reason); if (session != NULL) { - wifi_aware_session_destroy(session); wifi_aware_session_unset_message_received_cb(session); + wifi_aware_session_destroy(session); } } diff --git a/test/wifi-aware-subscribe-test.c b/test/wifi-aware-subscribe-test.c index 2331522..26e3590 100644 --- a/test/wifi-aware-subscribe-test.c +++ b/test/wifi-aware-subscribe-test.c @@ -407,8 +407,8 @@ static void __session_terminated_cb(wifi_aware_session_h session, printf("reason: %d\n", reason); if (session != NULL) { - wifi_aware_session_destroy(session); wifi_aware_session_unset_message_received_cb(session); + wifi_aware_session_destroy(session); } } -- 2.7.4