mirror of git://git.sysmocom.de/ofono
modem: Be a bit more paranoid with lock_owner reset
This commit is contained in:
parent
8c88ccaad9
commit
8637e31d1d
|
@ -736,6 +736,8 @@ static void lockdown_remove(struct ofono_modem *modem)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free(modem->lock_owner);
|
g_free(modem->lock_owner);
|
||||||
|
modem->lock_owner = NULL;
|
||||||
|
|
||||||
modem->lockdown = FALSE;
|
modem->lockdown = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -824,6 +826,8 @@ static DBusMessage *set_property_lockdown(struct ofono_modem *modem,
|
||||||
|
|
||||||
if (modem->lock_watch == 0) {
|
if (modem->lock_watch == 0) {
|
||||||
g_free(modem->lock_owner);
|
g_free(modem->lock_owner);
|
||||||
|
modem->lock_owner = NULL;
|
||||||
|
|
||||||
return __ofono_error_failed(msg);
|
return __ofono_error_failed(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue