gchar *interface = NULL;
gchar *property = NULL;
gchar *loop_status = NULL;
- GVariant *value;
+ GVariant *value = NULL;
if (g_strcmp0(method_name, "Set") == 0) {
g_variant_get(parameters, "(&s&sv)", &interface, &property,
}
}
+ if (value == NULL) {
+ BT_ERR("value is NULL");
+ goto fail;
+ }
+
BT_DBG("Property: %s\n", property);
if (g_strcmp0(property, "Shuffle") == 0) {
return;
fail:
- g_variant_unref(value);
+ if (value)
+ g_variant_unref(value);
err = __bt_avrcp_set_error(ret);
g_dbus_method_invocation_return_gerror(invocation, err);
g_clear_error(&err);