cert_file = strrchr(value, '/');
if (cert_file == NULL) {
ERR("Failed to get cert file: %s", value);
+ g_free(field);
+ g_free(value);
goto out;
}
WIFI_CERT_STORAGEDIR, encoded_ssid);
if (dirname == NULL) {
ERR("Failed to create dirname");
+ g_free(field);
+ g_free(value);
goto out;
}
if (g_file_test(dirname, G_FILE_TEST_IS_DIR) != TRUE) {
S_IXGRP | S_IROTH | S_IXOTH) < 0) {
if (errno != EEXIST) {
g_free(dirname);
+ g_free(field);
+ g_free(value);
goto out;
}
}
WIFI_CERT_STORAGEDIR, encoded_ssid, cert_file);
if (cert_path == NULL) {
ERR("Failed to create cert path");
+ g_free(field);
+ g_free(value);
goto out;
}
if (__netconfig_copy_config(value, cert_path) != TRUE) {
ERR("Failed to read cert file %s", value);
g_free(cert_path);
+ g_free(field);
+ g_free(value);
goto out;
}