Commit 02c0c4fd authored by Slava Monich's avatar Slava Monich

[mms-engine] Fixed memory leak. Fixes JB#34899

According to valgrind:

16 bytes in 2 blocks are definitely lost in loss record 1,408 of 3,437
   at 0x4841B84: calloc (vg_replace_malloc.c:623)
   by 0x51620C3: g_malloc0 (gmem.c:134)
   by 0x1F9CB: mms_transfer_dbus_handle_enable_updates (mms_transfer_dbus.c:246)

if the corresponding conversation is open in Messages UI when MMS is being
sent or received.
parent f2bf370f
......@@ -145,6 +145,7 @@ mms_transfer_dbus_client_destroy(
MMSTransferDbusClient* client = data;
g_bus_unwatch_name(client->watch_id);
g_hash_table_destroy(client->requests);
g_slice_free(MMSTransferDbusClient, client);
}
static
......@@ -243,7 +244,7 @@ mms_transfer_dbus_handle_enable_updates(
g_free, mms_transfer_dbus_client_destroy);
}
if (!client) {
client = g_new0(MMSTransferDbusClient, 1);
client = g_slice_new0(MMSTransferDbusClient);
client->requests = g_hash_table_new(g_direct_hash, g_direct_equal);
client->watch_id = g_bus_watch_name_on_connection(priv->bus,
sender, G_BUS_NAME_WATCHER_FLAGS_NONE, NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment