netreg: Fix memory leak in HFP case

This commit is contained in:
Denis Kenzior 2011-10-21 14:02:51 -05:00
parent 8e882b75a0
commit 2f77d1a3e4
1 changed files with 3 additions and 1 deletions

View File

@ -1831,8 +1831,10 @@ static void netreg_unregister(struct ofono_atom *atom)
for (l = netreg->operator_list; l; l = l->next) {
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;
}
network_operator_dbus_unregister(netreg, l->data);
}