modem: Be a bit more paranoid with lock_owner reset

This commit is contained in:
Marcel Holtmann 2011-01-26 09:48:48 +01:00
parent 8c88ccaad9
commit 8637e31d1d
1 changed files with 4 additions and 0 deletions

View File

@ -736,6 +736,8 @@ static void lockdown_remove(struct ofono_modem *modem)
}
g_free(modem->lock_owner);
modem->lock_owner = NULL;
modem->lockdown = FALSE;
}
@ -824,6 +826,8 @@ static DBusMessage *set_property_lockdown(struct ofono_modem *modem,
if (modem->lock_watch == 0) {
g_free(modem->lock_owner);
modem->lock_owner = NULL;
return __ofono_error_failed(msg);
}