Skip to content

Commit

Permalink
[mms-engine] Fixed memory leak. Fixes JB#34899
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
monich committed Apr 14, 2016
1 parent f2bf370 commit 02c0c4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mms-transfer-list-dbus/src/mms_transfer_dbus.c
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 02c0c4f

Please sign in to comment.