Fix resource leak 92/244292/1
authorhyunuk.tak <hyunuk.tak@samsung.com>
Thu, 17 Sep 2020 03:50:48 +0000 (12:50 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Thu, 17 Sep 2020 03:50:50 +0000 (12:50 +0900)
Change-Id: I3c31a4cb77b7cbe7b1a8ab5a19471e029b715a82
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
test/connection_test.c

index 3667d4e..2e76e9a 100755 (executable)
@@ -2878,6 +2878,7 @@ int test_get_eapol_info(void)
                return -1;
        } else {
                printf("identity: %s\n", str);
+               g_free(str);
        }
 
        if (type == CONNECTION_ETHERNET_EAP_TYPE_MD5)
@@ -2890,6 +2891,7 @@ int test_get_eapol_info(void)
                        return -1;
                } else {
                        printf("anonymous_identity: %s\n", str);
+                       g_free(str);
                }
        }
 
@@ -2898,6 +2900,7 @@ int test_get_eapol_info(void)
                return -1;
        } else {
                printf("ca_cert_file: %s\n", str);
+               g_free(str);
        }
 
        if (type == CONNECTION_ETHERNET_EAP_TYPE_TLS) {
@@ -2906,6 +2909,7 @@ int test_get_eapol_info(void)
                        return -1;
                } else {
                        printf("client_cert_file: %s\n", str);
+                       g_free(str);
                }
 
                if (connection_profile_get_ethernet_eap_private_key_file(profile, &str) != CONNECTION_ERROR_NONE) {
@@ -2913,6 +2917,7 @@ int test_get_eapol_info(void)
                        return -1;
                } else {
                        printf("private_key_file: %s\n", str);
+                       g_free(str);
                }
        }
 
@@ -2941,6 +2946,7 @@ int test_get_eapol_info(void)
                        return -1;
                } else {
                        printf("pac_file: %s\n", str);
+                       g_free(str);
                }
        }