mirror of git://git.sysmocom.de/ofono
netreg: Fix memory leak in HFP case
This commit is contained in:
parent
8e882b75a0
commit
2f77d1a3e4
|
@ -1831,8 +1831,10 @@ static void netreg_unregister(struct ofono_atom *atom)
|
||||||
for (l = netreg->operator_list; l; l = l->next) {
|
for (l = netreg->operator_list; l; l = l->next) {
|
||||||
struct network_operator_data *opd = l->data;
|
struct network_operator_data *opd = l->data;
|
||||||
|
|
||||||
if (opd->mcc[0] == '\0' && opd->mnc[0] == '\0')
|
if (opd->mcc[0] == '\0' && opd->mnc[0] == '\0') {
|
||||||
|
g_free(opd);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
network_operator_dbus_unregister(netreg, l->data);
|
network_operator_dbus_unregister(netreg, l->data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue