Fix wrong pointer references in the test code 57/225957/1 accepted/tizen/unified/20200226.124301 submit/tizen/20200226.014233
authorSemun Lee <semun.lee@samsung.com>
Wed, 26 Feb 2020 01:20:02 +0000 (10:20 +0900)
committerSemun Lee <semun.lee@samsung.com>
Wed, 26 Feb 2020 01:20:02 +0000 (10:20 +0900)
Change-Id: Ic9991b65cc1ad314c73526f419d8d8d2b7593641
Signed-off-by: Semun Lee <semun.lee@samsung.com>
test/wifi_direct_test.c

index 474fc21..cfd8247 100644 (file)
@@ -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: