Fix crash on avrcp controller API (SIGSEGV)
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-avrcp-controller.c
index be6ce19..2da972d 100644 (file)
@@ -486,13 +486,10 @@ int _bt_avrcp_control_get_property(int type, unsigned int *value)
 
 int _bt_avrcp_control_set_property(int type, unsigned int value)
 {
-       GValue *attr_value = NULL;
        GDBusProxy *proxy = NULL;
        GError *error = NULL;
        GVariant *reply, *param;
 
-       g_value_init(attr_value, G_TYPE_STRING);
-
        switch (type) {
        case EQUALIZER:
                param = g_variant_new("s", equalizer_status[value].property);
@@ -512,7 +509,6 @@ int _bt_avrcp_control_set_property(int type, unsigned int value)
                break;
        default:
                BT_ERR("Invalid property type: %d", type);
-               g_value_unset(attr_value);
                return BLUETOOTH_ERROR_INTERNAL;
        }
 
@@ -536,7 +532,6 @@ int _bt_avrcp_control_set_property(int type, unsigned int value)
        }
 
        g_variant_unref(reply);
-       g_value_unset(attr_value);
 
        return BLUETOOTH_ERROR_NONE;
 }