From 7a596d9f5e07fe87e041044bcce596ac141a1b7b Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Wed, 26 Feb 2020 10:20:02 +0900 Subject: [PATCH] Fix wrong pointer references in the test code Change-Id: Ic9991b65cc1ad314c73526f419d8d8d2b7593641 Signed-off-by: Semun Lee --- test/wifi_direct_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/wifi_direct_test.c b/test/wifi_direct_test.c index 474fc21..cfd8247 100644 --- a/test/wifi_direct_test.c +++ b/test/wifi_direct_test.c @@ -2120,8 +2120,10 @@ void process_input(const char *input, gpointer user_data) break; printf("Enter info 2\n"); - if (scanf(" %50ms", &info2) < 1) + if (scanf(" %50ms", &info2) < 1) { free(info1); + info1 = NULL; + } break; case 3: -- 2.7.4