GVariant *params = NULL;
GVariant *message = NULL;
+ GVariant *str_var = NULL;
NETWORK_LOG(NETWORK_HIGH, "profile_name: [%s]", profile_name);
return NET_ERR_INVALID_PARAM;
}
-
- params = g_variant_new("(sv)", property, g_variant_new_string(value));
+ str_var = g_variant_ref_sink(g_variant_new_string(value));
+ params = g_variant_new("(sv)", property, str_var);
message = _net_invoke_dbus_method(CONNMAN_SERVICE, profile_name,
CONNMAN_MESH_INTERFACE, "SetProperty", params,
&Error);
+
+ g_variant_unref(str_var);
+
if (message == NULL) {
NETWORK_LOG(NETWORK_ERROR, "Failed to set Mesh %s Property", property);
__NETWORK_FUNC_EXIT__;