ret = bt_adapter_get_bonded_device_info(remote_address, &info);
if (ret != BT_ERROR_NONE) {
ERR("bt_adapter_get_bonded_device_info is failed : %d\n", ret);
+ bt_adapter_free_device_info(info);
return;
}
int security_type;
int mode;
int ret;
+ char *ssid = NULL;
+ char *key = NULL;
const char *mode_str = NULL;
/* dhcp server start */
return false;
}
- g_strlcpy(old_settings->ssid, vconf_get_str(VCONFKEY_SOFTAP_SSID),
- sizeof(old_settings->ssid));
+ ssid = vconf_get_str(VCONFKEY_SOFTAP_SSID);
+ if (ssid) {
+ g_strlcpy(old_settings->ssid, ssid, sizeof(old_settings->ssid));
+ free(ssid);
+ }
if (vconf_get_int(VCONFKEY_SOFTAP_SECURITY, &security_type) < 0) {
ERR("failed to get softap_security vconfkey");
}
g_strlcpy(old_settings->mode, mode_str, sizeof(old_settings->mode));
- g_strlcpy(old_settings->key, vconf_get_str(VCONFKEY_SOFTAP_KEY), sizeof(old_settings->key));
+
+ key = vconf_get_str(VCONFKEY_SOFTAP_KEY);
+ if (key) {
+ g_strlcpy(old_settings->key, key, sizeof(old_settings->key));
+ free(key);
+ }
old_settings->max_sta = MOBILE_AP_MAX_WIFI_STA;