Fix memory leak 97/234697/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 28 May 2020 04:59:01 +0000 (13:59 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 28 May 2020 04:59:01 +0000 (13:59 +0900)
Change-Id: Ice6489ea40f9f36c191828088b66def32c397ae8
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
tests/src/sticker_data_unittests.cc

index 72afec6..7b0294c 100644 (file)
@@ -124,7 +124,7 @@ TEST_F(StickerDataTest, utc_sticker_data_clone_p)
     int ret = sticker_data_clone(g_dh, &clone);
     EXPECT_EQ(ret, STICKER_ERROR_NONE);
 
-    ret = sticker_data_destroy(clone);
+    sticker_data_destroy(clone);
     clone = NULL;
 }
 
@@ -149,6 +149,9 @@ TEST_F(StickerDataTest, utc_sticker_data_get_app_id_p)
     char *app_id = NULL;
     int ret = sticker_data_get_app_id(g_dh, &app_id);
     EXPECT_EQ(ret, STICKER_ERROR_NONE);
+
+    if (app_id)
+        free(app_id);
 }
 
 /**
@@ -208,6 +211,9 @@ TEST_F(StickerDataTest, utc_sticker_data_get_uri_p)
 
     int ret = sticker_data_get_uri(g_dh, &type, &uri);
     EXPECT_EQ(ret, STICKER_ERROR_NONE);
+
+    if (uri)
+        free(uri);
 }
 
 /**