Fix memory leak 34/215434/1
authorInHong Han <inhong1.han@samsung.com>
Tue, 8 Oct 2019 06:18:03 +0000 (15:18 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 8 Oct 2019 06:18:34 +0000 (15:18 +0900)
Change-Id: Ie57fdd246e3381c19bf7a886899a8ffb26b855c8
Signed-off-by: InHong Han <inhong1.han@samsung.com>
client/sticker_dbus.c
server/stickerd_data_manager.c

index a3e2377..847283a 100644 (file)
@@ -558,7 +558,7 @@ static void _set_keyword_builder(char *keyword, GVariantBuilder *keyword_builder
         return;
     }
 
-    g_variant_builder_add(keyword_builder, "(s)", strdup((const char *)keyword));
+    g_variant_builder_add(keyword_builder, "(s)", (const char *)keyword);
 }
 
 int sticker_dbus_insert_sticker_info(GDBusConnection *gdbus_connection, sticker_data_h sticker_data)
index a3e235d..b0922da 100644 (file)
@@ -902,7 +902,7 @@ static void _set_keyword_builder(char *keyword, GVariantBuilder *keyword_builder
         return;
     }
 
-    g_variant_builder_add(keyword_builder, "(s)", strdup((const char *)keyword));
+    g_variant_builder_add(keyword_builder, "(s)", (const char *)keyword);
 }
 
 int stickerd_get_sticker_info(GVariant *parameters, GVariant **reply_body)