Skip to content

Commit

Permalink
[ril] Fix GRilIoTransportSocket object leak. JB#49798
Browse files Browse the repository at this point in the history
  • Loading branch information
d-grigorev committed May 5, 2020
1 parent 53929f9 commit 3a358dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ofono/drivers/ril/ril_plugin.c
Expand Up @@ -1064,8 +1064,11 @@ static void ril_plugin_slot_connected_cb(GRilIoChannel *io, void *user_data)
static void ril_plugin_init_io(ril_slot *slot)
{
if (!slot->io) {
slot->io = grilio_channel_new(ofono_ril_transport_connect
(slot->transport_name, slot->transport_params));
struct grilio_transport *transport =
ofono_ril_transport_connect(slot->transport_name,
slot->transport_params);

slot->io = grilio_channel_new(transport);
if (slot->io) {
ril_debug_trace_update(slot);
ril_debug_dump_update(slot);
Expand Down Expand Up @@ -1097,6 +1100,7 @@ static void ril_plugin_init_io(ril_slot *slot)
slot);
}
}
grilio_transport_unref(transport);
}

if (!slot->io) {
Expand Down

0 comments on commit 3a358dd

Please sign in to comment.