Remove memory allocation code for unused memory 19/258619/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Fri, 21 May 2021 06:58:25 +0000 (15:58 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Fri, 21 May 2021 06:58:25 +0000 (15:58 +0900)
Change-Id: I60260283272a1472bbc41da36e172d6f71b57b49
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/gesture.c

index abed09d..fa58fc0 100644 (file)
@@ -306,12 +306,13 @@ EXPORT_API int hand_gesture_start_recognition(hand_gesture_h handle, hand_gestur
        handle->recog_cb = callback;
        handle->recog_user_data = user_data;
 
-       hand_gesture_data_h gesture_data = (hand_gesture_data_h)calloc(1, sizeof(struct hand_gesture_data_s));
-       if (!gesture_data) {
-               return HAND_GESTURE_ERROR_OUT_OF_MEMORY;
-       }
+       // TODO: analysis the purpose of this data.
+       // hand_gesture_data_h gesture_data = (hand_gesture_data_h)calloc(1, sizeof(struct hand_gesture_data_s));
+       // if (!gesture_data) {
+       //      return HAND_GESTURE_ERROR_OUT_OF_MEMORY;
+       // }
 
-       ret = gesture_client_dbus_start_recognition(handle->gdbus_connection, gesture_type, gesture_data, callback);
+       ret = gesture_client_dbus_start_recognition(handle->gdbus_connection, gesture_type, NULL, callback);
        if (ret != HAND_GESTURE_ERROR_NONE) {
                LOGE("Failed to start recoginition : %d", ret);
                return HAND_GESTURE_ERROR_OPERATION_FAILED;